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?