Let $R$ be a ring and $I\subset R$ an ideal. Let's give an example of a ring $R$ such that $I^2=I$ but $I$ is not a direct summand of $R$.
Given ring $R$ and ideal $I$, i know that if $I$ is a direct summand of $R$ then $I^2=I$ but i can't show the converse.