We know that when a ring is an integral domain, we have that:
$$x^2=x \implies x^2-x = 0 \implies x(x-1) = 0$$
Since this is an integral domain, a product giving $0$ forces one of the the terms in the product to be $0$, therefore the solutions are:
$$x=0, x -1 = 0$$
However, what about when we have a ring but that's not an integral domain, can we find solutions to this equations such that neither of the two terms are $0$?