This question already has an answer here:
This is a problem from Dummit & Foote.
Prove that a non-zero finite commutative ring that has no divisor is a field. (Do not assume the ring has a 1)
Evidently, one has to use the theorem proved earlier, that a finite integral domain is a field. So, I have to prove that any non-zero finite commutative ring has a multiplicative identity. I am stumped.
I had proved that the only ideals this ring has are the trivial ideals, $0$ and $R$. This is seen easily by defining the homomorphism $\phi(r): R \to R = ar $ where $a$ is a non-zero element of a non-zero ideal $I$. The surjectivity of this map (pigeon hole principle), shows that the ideals are trivial.
Is this going to help me prove it has a $1$. How do I approach the problem?