A commutative ring is a field iff the only ideals are $(0)$ and $(1)$
It is the first answer but the user seems to be not active anymore. When the user made his proof for the converse that if the ideals of a commutative ring $R$ are only $(0)$ and $(1)$ then $R$ is a field did he use in his reasoning that $0\neq1$ ?
You can prove that every nonzero element is invertible if those are the only ideals. If $0=1$ then it is not a field, but the proof still works. You need to additionally assume that $0\neq 1$ to prove it is a field.
Sometimes in the definition of a ring the author specifies that it is always the case that $0\neq 1$, and that is probably true here.