Is this proof correct ?
Let $R$ be a PID. Prove $p\in R$ is prime if and only if $p\in R$ is irreducible.
Proof:
$\implies$
Let $p\in R$ and p prime.
Let $ab=p\in\langle p\rangle.$ Thus $p\mid ab$ and $p\mid a$ or $p\mid b$.
w.l.o.g suppose $p\mid a.$ Then $a=kp,$ for some $k\in R$.
$\implies p=ab=kpb \implies p(1-kb)=0 \implies 1-kb=0 \implies b=1 \implies p $ is irreducible.
$\Leftarrow $ (this side of the proof was based on Xam's proof :)
Let D be an euclidean domain and $p\in D$ irreducible.
Let $ab=p\in\langle p\rangle$. Thus $p\mid ab$.
Now if $p$ doesn't divides a, then we have to prove $p\mid b.$
Suppose $u=px+ay,$ for some $x,y\in D.$
$\implies bu=bpx+bay$
$\implies p\mid bay$ and $p\mid bpx$
$\implies p\mid bu$
As $ub\mid b,$ then $p\mid b$. Therefore $p$ is prime.
As I pointed out in my first comment, the first implication is essentially right, you just need to change $1-kb=0 \implies b=1$ for $1-kb=0 \implies b\in R^\times$ (here $R^\times$ is the set of units of $R$).
For the other implication, the basic idea is right. We need to show that there is some unit, let's say $u$ such that we can write $u=px+ay$. How do we do this? Here we use the hypothesis that $R$ is a PID. Namely, we consider the ideal $(p,a)$. Since $R$ is a PID, the above ideal is principal, therefore there is some $r\in R$, $r\neq 0$, such that $(r)=(p,a)$. As $p\in (p,a)=(r)$, we deduce that $r\mid p$, but since $p$ is irreducible, then $r$ and $p$ are associates or $r$ is an unit.
If $r$ and $p$ are associates, then as $r\mid a$ we conclude that $p\mid a$, but $p$ doesn't divide $a$, contradiction. Hence $r$ is an unit. Now, as $r\in (r)=(p,a)$, we can write $r=px+ay$. (In other words, we can take $u=r$ as our desired unit).