Can a compact object be a nontrivial self-retract? Let $\mathcal C$ be a locally finitely-presentable category, and let $X$ be a finitely-presentable object of $\mathcal C$.
Question: Can there exist a nontrivial idempotent on $X$ whose fixed points are isomorphic to $X$?
I don't think this should be possible in reasonable cases.
Instances of this question include:


*

*Can a finitely-presentable ring be a nontrivial retract of itself?

*Can a finitely-presentable group be a nontrivial retract of itself?

*Can a finitely-presentable module be a nontrivial retract of itself?
et cetera.
EDIT: It occurs to me that there's a "universal" example where this does occur: let $\mathcal A$ be the category freely generated by an object with a nontrivial self-retract, and let $\mathcal C$ be the presheaf category on $\mathcal A$. So I suppose I'm really looking for conditions ensuring that this doesn't happen.
 A: The property just says that every split epimorphism $X \to X$ (equivalently, every split monomorphism $X \to X$) is an isomorphism. I find this is easier to analyse.
I do not agree that this "should" hold in reasonable cases. I would rather say that it holds "just by accident" in some categories.
There is an immediate counterexample given by the universal cocomplete category with an object $X$ and two morphisms $i,p : X \to X$ satisfying $p \circ i = \mathrm{id}_X$. I omit its construction here, but one can check from its construction that it is locally finitely presentable, that $X$ is finitely presentable and that $p$ is no isomorphism.
There are non-commutative rings $R$ with $R \cong R^2$ as $R$-modules (for example take $R$ to be the endomorphism ring of an infinite-dimensional vector space), so here $\mathrm{Mod}_R$ doesn't have the property. But when $R$ is commutative, then $\mathrm{Mod}_R$ has this property. It has already been proven in the comments, but here is a different proof: Let $M \cong M \oplus N$ for some finitely presentable $M$. Then $N$ is finitely presentable as well. By Noetherian approximation, we way massume that $R$ is Noetherian*. Then $M$ is Noetherian. But then every epimorphism $M \to M$ is an isomorphism, so $N=0$.
I am pretty sure that the category of groups doesn't have the property either, but it will be hard to find counterexamples.
*Details: $R$ is a filtered colimit of finitely presentable, thus Noetherian commutative rings $R_i$. Then $M \cong M_i \otimes_{R_i} R$ for some $i$, the same for $N$, since $M$ and $N$ are finitely presentable (just lift the presentation). The homomorphism $M \to M \oplus N$ also lifts to $M_i \to M_i \oplus N_i$ after increasing $i$ if necessary, the same for its inverse, and since they become inverse in the colimit, they become inverse over $R_i$ if we increase $i$ again.
