It is easy to see that in an atomic domain (where every element factors into irreducibles), we have that all irreducibles are prime iff the domain in question is an UFD.
I think it is not true for a general (commutative, unital) ring: if we consider the ring of eventually constant sequences of integers, we can find there elements which do not decompose (in fact, any sequence which is not eventually $0,1$ or $-1$ will be like that), and irreducible elements are those which have one prime coordinate, and all others $0,1$ or $-1$.
But what about domains? Can there be a domain where all irreducibles are prime, but which is not a unique factorisation domain? Better yet, is there a domain where there are no irreducible elements?