idempotents acting as local identities

Let $R$ be a ring with unity (not necessarily commutative) and $I$ an ideal of $R$.

Suppose that for every element $a \in I$ there exists an element $c\in I$ such that $ac=a$.
Note that $c$ is related to $a$. Now we have the following question:

Can we say that for every element $a\in I$ there exists an idempotent element $c\in I$ such that $ac=a$?

Of course we have many examples such that the answer is true for them but in general we don’t know.

Solutions Collecting From Web of "idempotents acting as local identities"

Consider the ring $R$ of continuous functions $\mathbb R\to\mathbb R$ with compact support.

There are no non-zero idempotents in this ring, yet your condition holds. Indeed, if $a\in R$, let $c\in R$ be any function which is equal to $1$ on the support of $a$.

Later This ring does not have a unit, and you wwanted it to have one. But if $R$ does have a unit then your question is trivial: you can always take $c=1$!