This does not answer the general question, but a simple special case, which I find cute:
Suppose $R$ is a finite dimensional algebra over a field of characteristic zero. Pick $x$, $y\in R$. Since $[x,y]$ is a commutator, its action on every finite dimensional $R$-module is of trace zero; on the other hand, since $[x,y]$ is by hypothesis idempotent, its trace on a module is the dimension of its image. It follows that $[x,y]$ acts by zero on every module so, because faithful modules do exist, it must be zero.
Later. Consider the non-commutative polynomial $f(x,y)=[x,y]^2-[x,y]$, and define new polynomial $h$ by $$h(x,y)=f(x,y)-f(y,x)$$ A simple computation shows that $h(x,y)=2[x,y]$.
If we plug elements of $R$ into $f$ we get zero, so the same is true of $h$. The above observation means then that $2[x,y]=0$ for all $x$, $y\in R$. If now $2$ is invertible in $R$, or at least not a divisor of zero, then we see that $R$ is commutative.
Definitions: if $x\in R$ and $R$ is a ring, then we say that an element is idempotent if $x^2 = x$, and nilpotent if for some $n\in\mathbb N: x^n=0$.
Now, suppose that $x$ is non-zero and idempotent. Note that $x^3 = x x^2 = xx = x^2 = x$. What can we say in general about $x^n$?
Best Answer
This appears to be a misstatement of the following theorem:
The reason is that if $e$ is idempotent, then $[e,er]^2=0$ and $[e,re]^2=0$. The condition that commutators which are nilpotent are zero forces $[e,er]=[e,re]=0$, and if you expand them this says that $er=ere=re$, showing that $e$ is central.
Edit: The OP was consequently edited to have the correctly stated problem.