Suppose $R$ is a commutative ring with unity such that each of its proper ideals can be generated by a single element.
We know if $R$ is an integral domain, then $R$ is a PID, and so its nontrivial proper prime ideals should be maximal. Now, what if we consider a more general case that $R$ is only commutative with unity? Can we prove if $R$ is a commutative ring with unity such that each of its proper ideals can be generated by a single element, then its nontrivial proper prime ideals should be maximal? If not what is a counterexample?
I prove the statement for the case when $R$ is an integral domain as follows:
Suppose $aR$ is a nontrivial prime ideal which is strictly contained in $bR$. Then, there exists $r_0 \in aR$ such that $a=br_0$. Since, $r_0 \in aR$ there exists $r_1$ such that $r_0=ar_1$. Hence, $$a=bar_1 \Rightarrow a(1-br_1)=0$$
Now, since $R$ is an integral domain and $a$ is nonzero, $1-br_1=0$ and $b$ is unit. So, $bR=R$, and $aR$ is maximal.
If $R$ is not an integral domain, we cannot conclude $1-br=0$. So, how to prove that, or what is the counterexample?