A cancellation ring is one in which if ab= 0 then either a=0 or b= 0. It is not necessarily true that a cancellation ring has inverses or even has a multiplicative identity. In particular, the set of all even integers, with usual addition and multiplication, is a cancellation ring that has no multiplicative identity. Obviously, if the ring does not have a multiplicative identity, then this cannot be true.
You cannot use the argument "ab- a= a(b- 1)" because, if the ring has no multiplicative identity, ab- a= a(b- 1) is not true.
If it is given that the ring has a multiplicative identity (some texts, but not all, require a "ring" to have a multiplicative identity), you still cannot use "ab=a so because you do not know that a has an inverse. You can, however argue that if ab= a, then ab- a= a(b- 1)= 0. Since this is a cancellation ring, either a= 0 or b-1= 0. Since it is given that a is not 0, b- 1= 0 so b= 1.
I searched wikipedia and it's called the cancellation property, not law. Sorry.
Anyway, I'm using Hungerford to study for my algebra course and a number of exercises depend on this dubious conclusion to work. For example, how do I solve the following exercise without recurring to the conclusion ab=a => b=1?
Let f:R-->S be a non zero homomorphism such that R has identity and S has no zero divisors. Prove that is the identity of S.