I tried this and i don't know , if there is any fallacies in my arguement.
If $a$ is prime then it is easy to show.
If $a$ is not prime the $<a>$ is cannot be a maximal ideal of $R$, since $R$ is PID.
$\implies \exists$ a maximal ideal of $R$, say M,which contain $<a>$.
since $R$ is a PID then $M=<p>$ , where p is prime.
$\implies$ $<a> \subset <p>$ hence $a=pr$ for some $r \in R \implies p|a$
Your argument is good. As an alternative: PID $\implies$ UFD and in this is just one of the definitions of an UFD.