Let $(B, +, \cdot)$ be a non-trivial ring with the property that every $x \in B$ satisfies $x \cdot x = x$. How does one prove that such a ring $(B, +, \cdot)$ must have a unit element $1_B$? (Or, in case this is not true in general, what is a counterexample?)
BTW, I'm looking for an elementary proof, not requiring anything more than the definition of a ring, the definition of $(B, +, \cdot)$, and, if necessary, the easily shown facts that $x + x = 0$ and $x\cdot y = y\cdot x,\,\forall\, x,y \in B$.