Suppose that $\mathbb{R}$ is a ring with no zero-divisors and that $\mathbb{R}$ contains a nonzero element $b$ such that $b^2 = b$. Show that $b$ is the unity for $\mathbb{R}$.
I attempted to show that $ab=a$ as $b$ is the unity for that ring. Now, with that assumption, $$(ab)^2=a^2$$ $$\implies abab=a^2$$
Multiplying both sides by $b$ and using $b^2=b$ we get:
$$abab=a^2b=a(ab)$$
Not only can we not take inverse on both sides (as it is not mentioned), but this kinda seems like a circular proof. I proved what I assumed so it is definitely incorrect.
I am unable to come up with any other method. What is the correct proof here?
Let $a\in R$ an arbitrary, nonzero element. Then $ba = b^2a \implies (b^2-b)a =0 \implies b^2-b=0\implies b(b-1)=0 \implies b=0 \text{ or } b=1$, but since we have assumed $b\neq 0$ we have $b=1$ (unity in the ring)
Edit:
There actually isn't really any need for the arbitrary element $a$ -- we could just have easily have said $b^2=b \implies b^2-b=0$ and worked from there. Sorry for the extraneous detail.