If $e$ is an idempotent then so is $1-e$ and $e(1-e)=0$. This means that $(e)\cap(1-e)=0$. Now notice that for all $r\in R$, $r=re+r(1-e)$ so $R=(e)\oplus (1-e)$. But $(e)\subset I$ and $I\cap (1-e)=0$ so $(e)=I$.
If $e$ is an idempotent then so is $1-e$ and $e(1-e)=0$. This means that $(e)\cap(1-e)=0$. Now notice that for all $r\in R$, $r=re+r(1-e)$ so $R=(e)\oplus (1-e)$. But $(e)\subset I$ and $I\cap (1-e)=0$ so $(e)=I$.