Peirce decomposition of a ring: must the ideal generators be idempotent in characteristic 2?

Just observe that $ef=0$ means $e(1-e)=0$ so $e-e^2=0$ and $e^2=e$.


No, it has nothing to do with characteristic $2$. The representations of elements as $i+j$ in a direct sum are necessarily unique (that is an equivalent way of saying it.)

So to continue from what you wrote, since $e^2\in I$ and $f^2\in J$, and $e+f=e^2+f^2$, we necessarily have $e=e^2$ and $f=f^2$.

That's another way, not as direct as Eric's but still useful to know.