Maschke's averaging lemma for modules

Statement
Suppose $$R$$ is a unital ring and $$M$$ is a $$R$$-module. Suppose $$G$$ is a finite subgroup of $$\operatorname{Aut}_R(M)$$ with the property that the order $$|G|$$ is an invertible element of $$R$$.

Suppose $$N$$ is a direct summand (i.e., a submodule that has a complementary submodule) of $$M$$, and $$N$$ is $$G$$-invariant. Then, $$N$$ has a $$G$$-invariant direct complement in $$M$$.

Applications

 * Maschke's averaging lemma: The case where the base ring is a field.
 * Maschke's averaging lemma for Abelian groups

Other related facts

 * Centralizer-commutator product decomposition for Abelian groups
 * Centralizer-commutator product decomposition for p-groups
 * Centralizer-commutator product decomposition for finite groups