Prove/Disprove:
Let $R$ be a commutative ring with unity. In $R$ for any two distinct non-trivial ideals $I,J\subseteq R$ we have $(I+J)^2=I+J$. Given ideals $I$ and $J$ in $R$ can we find idempotents $e,f\in R$ such that $I=Re,J=Rf$ where $ef=0$?
An ideal $I$ is said to be non-trivial if $I\neq \{0\},R.$
MY TRY:
If I try to prove the fact then let us assume that $I,J$ be two non-trivial ideals in $R$,then $(I+J)^2=I+J$,How should I show that $I=Re,J=Rf$ where $e^2=e;f^2=f;ef=0$??
OK, I misunderstood you question. You want $(I+J)^2=I+J$ for every pair of non trivial distinct ideals.
The answer is still NO. Take $R=\mathbb{C}^3$. Any ideal of $R$ is the direct product of copies of $(0)$ or $\mathbb{C}$, so $R$ clearly satisfies your assumption.
Take $I=\mathbb{C}\times \mathbb{C}\times (0)$ and $J=\mathbb{C}\times (0)\times (0).$
Then $I=(1,1,0)R$ and $J=(1,0,0)R$. Notice that the idempotents of $R$ are the vectors whose coordinates are $0$ or $1$. There is only one idempotent generating $I$ , which is $e=(1,1,0)$ and there is only one idempotent generating $J$, which is $f=(1,0,0)$. Unfortunately $ef\neq 0$.