Let $R$ be a (commutative or non-commutative) unital ring, fix $a \in R$, and denote by $r(\cdot)$ the right annihilator of an element.
Question. If $r(a)$ is a (right) direct summand of $R$ and $r(a) = r(a^2)$, does there exist an idempotent $e \in R$ such that $r(a) = eR$ and $r(1-a) \subseteq (1-e)R$?
It is obvious that $r(a) \cap r(1-a) = \{0\}$ and hence the sum $r(a) + r(1-a)$ is direct. Moreover, it is not difficult to check that $r(a) \oplus r(1-a) = r(a-a^2)$. So, we see that the answer to the question is yes when $R$ is a right Rickart ring, that is, a ring where every right annihilator is a direct summand: This is, in some sense, a trivial consequence of the definitions (let alone that it has nothing to do with the "if" clause of the question); however, it rules out a whole variety of potential counterexamples.
The answer is still yes for (commutative or non-commutative) local rings. In a way, the reason is once again trivial: If $R$ is local, then either $a$ is a unit and then $r(a) = \{0\}$ (so we can take $e = 0$); or $a = 0$ and then $r(a) = R$ and $r(1-a) = \{0\}$ (so we can take $e = 1$); or $a$ is a non-zero non-unit and then $r(a)$ is not a direct summand of $R$, or else $R$ would have an idempotent that is neither $0$ nor $1$ (which, in a local ring, is just impossible).
It is perhaps worth noting that $r(1-a) \subseteq aR$ and, if $r(a) = r(a^2)$, then $r(a) \cap aR = \{0\}$.