Are oracles needed in security proofs to prove that one problem is equivalent to the other? I have seen a few security proofs where they show that solving one problem is equivalent to solving the other, via use of an oracle.

For example, when proving that problem A is equivalent to problem B. We assume an oracle which can solve problem A in polynomial time. Are there any other ways to prove that two problems are equivalent without an oracle?
As Squeamish Ossifrage pointed out in the comments, if you define "B is at least as hard as A" by "there is an algorithm that solves A given an oracle that solves B", which is a relatively standard way of defining "as hard as", then the oracles show up naturally in the reduction.

Yet, it should be pointed out that this is not always the definition. What Squeamish Ossifrage discussed corresponds to black-box reductions between primitives A and B. Put otherwise, saying "A and B are black-box equivalent" is exactly the same as saying that one can solve A with an oracle for solving B, and the other way around. Intuitively, a black-box reduction is a reduction that looks only at the input/output behavior of the primitive/attack, and does not use any specific details of its concrete implementation. In this case, it makes perfect sense to represent it by an oracle, since we do not care about how it's concretely implemented.

There are, however, many non-black-box reductions in cryptography. Black-box reductions are still by far the most common; they are much easier to find (non black-box techniques are often very advanced), often more efficient, and allow for proving separations (for example, we know that one-way functions and public-key encryption are provably not black-box equivalent: we can demonstrate that there is no black-box construction of PKE from OWF). A non-black-box reduction would not involve any oracle. It would be of the following form:

If there exists an algorithm $\mathsf{Alg}_A$ that breaks the primitive $A$, then there exists an algorithm $\mathsf{Alg}_B$ which, given the code of $\mathsf{Alg}_A$ as input, can break the primitive $B$.

(or, equivalently, you can also talk about a provably secure construction of a primitive using the code of a secure construction of another primitive)

Example of non-black-box reductions in cryptography include the construction of PKE from iO and OWF; the construction of maliciously secure computation from semi-honest secure computation and zero-knowledge proofs; a bunch of specific zero-knowledge proofs by Barak; the construction of IBE from CDH; the construction of iO from functional encryption; the construction of IND-CCA-secure encryption via IND-CPA secure encryption and NIZKs (the Naor-Yung paradigm); and many others. Some of these actually achieve constructions which are provably impossible to obtain via black-box reduction (see e.g. the paper of Barak).