Given a ring $R$(with or without $1$,may or may not be commutative), $R$ is also an $R-$module. Let $\phi_{ring}\colon R \to R $ be a ring homomorphism and $\phi_{module} \colon R \to R$ be a left $R-$module homomorphism. When(if ever) is $\phi_{ring} = \phi_{module}$.
If ring has a $1$, then $\phi_{ring}(x \times 1)=\phi_{ring}(x) \times \phi_{ring}(1)=\phi_{ring}(x)$ and $\phi_{module}(x\times 1)=x \times \phi_{module}(1)$ .If $\phi_{ring}(x)=x$ and $\phi_{module}(1)=1$,then $\phi_{ring}=\phi_{module}.$
What if the ring does not have $1$.
Of course, the identity mapping on the ring is always a ring and module homomorphism.
Given a left $R$-linear ring homomorphism $\phi:R\to R$, it would have to satisfy $\phi(a)\phi(b)=a\phi(b)$ for all $a,b\in R$.
If there exists even just one $b\in R$ such that $\phi(b)$ is left regular (meaning it is not a right zero divisor) then from $(\phi(a)-a)\phi(b)=0$ we can conclude that $\phi(a)=a$ for all $a\in R$.
If $R$ is full of zero divisors, then other such maps are possible. To name an extreme case, if $R$ is any ring such that $R\cdot R=\{0\}$, then every additive group homomorphism $\phi:R\to R$ is a left $R$-linear ring homomorphism.