When discussing rings, integral domains, fields etc, I'm told that the cancellation law holds in any ring that has no zero divisors. By cancellation law, I mean that if we have no zero divisors, we can look at the equation $ab = ac$ and "cancel" the a on the left-hand side, and thus know that $b=c$. (I believe that the proof of this comes out of saying that $(ab-ac) = a(b-c) = 0$ thus implying that $(b-c) = 0$ if $a \neq 0$, and so $b=c$).
What I'm confused about, is that the requirement for the cancliation law is simply that our ring has no zero divsors, there's no mention of our ring containg unity. However, if our ring doesn't contain unity, but the cancellation law holds, then what can we make of the equation $a^2 = a$? Every time I try to simplify this, I find the need to use unity, which I don't believe I am guaranteed to have in my ring. Does saying that our ring has no zero divisors, in fact, imply that our ring contains unity?
Can somone help explain/correct this apparent paradox for me please?