It is known that every element in a ring with finitely many ideals is either a unit or a zero divisor.
Now consider a ring $R$ with exactly three ideals. Take an element $x$ such that $(x)\neq (1)$. For $y\in R$ and $y\notin (x)$, there are two possible cases:
$(y)=(1)$
$(y)\neq(1)$. Then $(y)=(x)$, that is $x=ys=xts$ for some $s,t\in R$. It follows that $$x(1-ts)=0$$ which implies that $x$ is a zero divisor.
However, if there is no such a $y$ of the second case, how to prove $x$ is a zero divisor?