**Fact 1:** If $M$ is a monoid where primes are atoms, then $M$ is Dedekind-finite.

*Proof.* Working contrapositively, assume $ab=1$ with $a,b\in M\setminus M^{\times}$.  Now $a$ is prime since it divides *every* element $x\in M$ (because $x=xab$).  On the other hand $a=a(ba)$ is a product of two non-units [if $ba\in M^{\times}$ then $a$ is left invertible, and $ab=1$ implies it is right invertible, a contradiction], so $a$ is not an atom. $\boxed{\,}$

**Fact 2:** If $M$ is a monoid satifying
$$
(\dagger)\qquad \forall r,s,t\in M,\ (rst^2=st\lor t^2sr=ts)\implies t\in M^{\times}
$$
then primes are atoms.

*Proof.* Assume contrapositively $p\in M$ is prime but not an atom.  If $M$ is not Dedekind-finite, then $(\dagger)$ fails, and we are done.  So we hereafter assume $M$ is Dedekind-finite.

Since $p$ is not an atom write $p=xy$ with $x,y\in M\setminus M^{\times}$.  As $p|xy$, without loss of generality we may assume $p|x$.  Thus $x=apb$ for some $a,b\in M$, and we then have $p=(ap)(by)$.  As $y$ is not a unit, Dedekind-finiteness implies $by\notin M^{\times}$.  Now
$$
p=ap(by)=a^2p(by)^2.
$$
Taking $r=a$, $s=ap$, and $t=by$ shows that $(\dagger)$ fails. $\boxed{\,}$

Note that this class (the $(\dagger)$ monoids) contains the bounded factorization monoids, which in turn encompasses both the commutative, unit-cancellative monoids, and the free monoids.