It is quite easy to show that for $A$ an integral domain, an element $a \in A$ is irreducible if and only if the principal ideal $\langle a \rangle$ is maximal for inclusion among proper principal ideals.
I was wondering now whether there would be a counterexample if $A$ is not an integral domain but only a commutative ring. Or can one even generalize it?
The proof of the fact above is the following:
Assume $a$ is irreducible and assume $\langle b \rangle \supset \langle a \rangle$, $b \notin A^\times$ (otherwise the ideal would not be proper). So $a = bu$, and since $a$ is irreducible: $u \in A^\times$. It then follows that $b = a u^{-1}$ and hence $\langle b \rangle = \langle a \rangle$.
Conversely, write $a = bu$ and $b \notin A^\times$, $u \in A$. Then $ \langle a \rangle \subset \langle b \rangle \Rightarrow \langle a \rangle = \langle b \rangle$. So $b = av$ for some $v \in A$. Hence $a = auv \Leftrightarrow a(1 - uv) = 0$ and since $A$ is an integral domain: $1 = uv$, so $u$ is a unit.