Let $R$ be a ring with unity not necessarily commutative and $I$ an ideal of $R$.
Let 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=c$?
Off course we have many examples such that the answer is true for them but in general we don't know.
Yes we can. $c=c^2=0$ will suffice.
If however your question contains a misprint and you actually meant $ac=a$, as in the assumption, then the answer is "no".
Counterexample: $R=C([0,1])$, $$ I=\{f\in C([0,1])\,\colon\, \exists\delta>0\,\text{ such that }f(x)=0,\,x\in[0,\delta]\}. $$ (Of course, $\delta$ depends on $f$.) Note that the assumption holds (exercise: prove this!), but $I$ does not contain nonzero idempotents at all.