Note that we may assume that $R$ is generated by $r$ (if not, just restrict the problem to the subring generated by $r$). In particular, this lets us assume that $R$ is commutative, which makes the machinery of algebraic geometry available. But this result is basically trivial in the language of algebraic geometry, using the correspondence between idempotents and clopen subsets.
In detail, since $I$ is contained in the nilradical of $R$, the quotient map $q:R\to R/I$ induces a homeomorphism $q^*:\operatorname{Spec} R/I\to \operatorname{Spec} R$. Now, an idempotent element of a ring corresponds to a clopen subset of its spectrum, with the idempotent element being $1$ on the clopen subset and $0$ on the complement. So there is some clopen subset $A\subseteq\operatorname{Spec} R/I$ such that $q(r)$ is $1$ on $A$ and $0$ on the complement of $A$. But then $q^*(A)$ is a clopen subset of $\operatorname{Spec} R$, so there is some element $e\in R$ which is $1$ on $q^*(A)$ and $0$ on its complement. This $e$ will then be idempotent, and $q(e)=q(r)$ (since they are both $1$ on $A$ and $0$ on its complement) and so $e-r\in I$.
(As is typical in this sort of argument, much of the real work is hidden in the proof that the structure sheaf of Spec of a ring really is a sheaf. Indeed, that is what we are using to construct the element $e$, by gluing together sections of the structure sheaf of $\operatorname{Spec} R$ over $A$ and its complement.)