If you're willing to accept the fundamental theorem of arithmetic (which can be proved by elementary -i.e., "ideal free"- methods, see the link) that states that any integer different from $\pm 1$ can be written as a unique product (up to ordering of the factors) of prime numbers, then the equivalence of both definitions of prime numbers
$$
(\ m \vert p \ \Longrightarrow \ m = \pm 1 \ \text{or} \ \pm p \ )
\qquad \Longleftrightarrow \qquad
(\ p \vert ab \ \Longrightarrow \ p \vert a \ \text{or} \ p \vert b \ )
$$
is clear:
[Warning. If you feel more comfortable working only with positive integer numbers, then just drop those $\pm$ all over this answer.]
$(\Longrightarrow)$ If $p\vert ab$, then $ab = pq$ for some integer $q$. Since both $ab$ and $pq$ can be uniquely written as a product of prime numbers, $p$ must be a prime factor of $ab$. But prime factors of $ab$ are necessarily prime factors of $a$ or $b$, again by the uniqueness of the fundamental theorem of arithmetic. So, $p$ is necessarily a prime factor of $a$ or $b$; that is, $p\vert a$ or $p\vert b$.
$(\Longleftarrow)$ Again, if $m\vert p$, all prime factors of $m$ must be prime factors of $p$. But the only prime factors of $p$ are $\pm p$. So, either $m = \pm p$, or $m=\pm 1$.
Of course, there is little (big?) circular argument here, because one already uses implication $(\Longrightarrow)$ in the proof of the fundamental theorem of arithmetic. This implication is called Euclid's lemma. But it can be proved by elementary methods too, that rely on Bézout's identity (whith elementary proof too: see the last link).
So, as you can see, everything is elementary, but, perhaps, too long for a single answer and to remember in one go. While reasoning using the fundamental theorem of arithmetic may be seen as little short cut easier to remember the next time you have any doubt about the equivalence of both definitions of prime number.
(In fact, a number satisfying the left hand side condition is called "irreducible", while $p$ on the right hand side is called "prime". So "prime = irreducible", at least for integer numbers.)