TITLE: Epimorphisms and free submodules
QUESTION [5 upvotes]: By inspecting the accepted answer to this question 
Are epimorphisms from a division ring isomorphisms ? 
one obtains the following necessary condition for epimorphisms: 

Let $R \le S$ be rings with identity $1\neq 0$ such that $S$ is flat as right $R$-module. If the inclusion $R \hookrightarrow S$ is an epimorphism, then for each  $s \in S$ there is $r\in R, r\neq 0$ such that $rs \in R$. 

Proof: The statement says that $S/R$ has no left $R$-submodule isomorphic to $R$. If it is wrong, we have an embedding $R \hookrightarrow S/R$ and hence $0 \neq S = S \otimes_R R \hookrightarrow S\otimes_R S/R$ 
But by the quoted answer, $S\otimes_R S/R=0$ if $R \to S$ is epi. $\blacksquare$
However, without success I tried to drop the flatness condition. Whence my question: 
Question: Is the statement above still valid, if $S$ is not supposed to be flat as right $R$-module ?

REPLY [10 votes]: A simple counterexample can be constructed using free objects: 
For a set $X$ let $\mathbb{Z}\langle X\rangle$ be the free ring on $X$ and let $\mathbb{Z}F(X)$ be the group ring of the free group $F(X)$ on $X$. The inclusion $X \hookrightarrow F(X)$ induces a ring homomorphism $i: \mathbb{Z}\langle X\rangle \to \mathbb{Z}F(X)$ which is an epimorphism. If $x\neq y$ are in $X$ then $xy^{-1} \in \mathbb{Z}F(X)$ and there is obviously no "polynomial"  $f \in \mathbb{Z}\langle X\rangle$ such that $fxy^{-1} \in \mathbb{Z}\langle X\rangle$. 
To see that $i$ is an epimorphism, note that $\mathbb{Z}F(X)$ is generated (as a ring) 
by $x,x^{-1}\;(x \in X)$ and a unitary ring homomorphism $\varphi: \mathbb{Z}F(X) \to T$ satisfies 
$\varphi(x^{-1})=\varphi(x)^{-1}$. Hence $\varphi$ is determined by its values on $X$. 

Update: The property in question holds true for commutative rings. 
Proof: At first assume this has already been proved for zero-dimensional local commutative rings. Let $R \le S$ be an epimorphic extensions of comm. rings and choose a minimal prime $\mathfrak{p}$ of $R$ (exists by Zorn's lemma). $R_\mathfrak{p}$ is a local ring of dimension $\text{ht}(\mathfrak{p})=0$. Since $R\setminus \mathfrak{p}$ is a multiplicative subset of $S$ we can localize and obtain a comm. diagramm
$$\begin{array}{ccc}
R & \xrightarrow[\scriptstyle\text{epi}]{i} & S\;\;\; \newline 
{\scriptstyle\text{epi}}\downarrow &  & \downarrow\scriptstyle\text{epi} \newline 
R_\mathfrak{p} & \xrightarrow[i_\mathfrak{p}]{} & (R\setminus \mathfrak{p})^{-1}S
\end{array}$$
Hence $i_\mathfrak{p}$ is epi and it's easy to see that $i_\mathfrak{p}$ is mono as well. 
Let $s \in S$. By our assumption there are $r_i/t_i \in R_\mathfrak{p},\;r_1/t_1 \neq 0$ such that $\frac{r_1}{t_1}\frac{s}{1}=\frac{r_2}{t_2}$, i.e. there is $t \in R\setminus \mathfrak{p}$ with $(tt_2r_1)s=tt_1r_2 \in R$. Moreover $tt_2r_1 \neq 0$ (because $r_1/t_1 \neq 0$ in $R_\mathfrak{p}$ just says there is no $t \in R\setminus \mathfrak{p}$ such that $tr_1=0$ in $R)$ and we are done. 
Now suppose $R$ is zero-dimensional local comm. with max. ideal $\mathfrak{m}$. Again from the comm. diagramm 
$$\begin{array}{ccc}
R & \xrightarrow[\scriptstyle\text{epi}]{i} & S\;\;\; \newline 
{\scriptstyle\text{epi}}\downarrow\;\; &  & \downarrow\scriptstyle\text{epi} \newline 
R/\mathfrak{m} & \xrightarrow[i_\mathfrak{m}]{} & S/\mathfrak{m}S
\end{array}$$
we conclude that $i_\mathfrak{m}$ is epi and since $R/\mathfrak{m}$ is a field, $i_\mathfrak{m}$ is an isomorphism (see the link in the OP's question). Hence each $s \in S$ can be written as 
$$s=r + \sum_{i=1}^l m_is_i\qquad (r\in R, s_i \in S, m_i \in \mathfrak{m}, m_i \neq 0)$$
We want to show that there is $r_0 \in R,\;r_0 \neq 0$ such that $r_0s\in R$. 
If $l=0$ then $s=r\in R$ and we are done. Otherwise, since $\mathfrak{m}=\sqrt{0}$ there is $n_1> 0$ maximal such that $m_1^{n_1} \neq 0$ and multiplying yields 
$$m_1^{n_1}s=m_1^{n_1}r + \sum_{i=2}^l (m_1^{n_1}m_i)s_i.$$
If $m_1^{n_1}m_2=0$ ignore the corresponding summand. Otherwise, there is $n_2>0$ maximal such that $m_1^{n_1}m_2^{n_2}\neq 0$. Multiplying again yields 
$$m_1^{n_1}m_2^{n_2}s=m_1^{n_1}m_2^{n_2}r + \sum_{i=3}^l(m_1^{n_1}m_2^{n_2}m_i)s_i.$$
Proceeding this way,  we obtain the required $r_0$ in the form $r_0 = \prod_{j=1}^k m_{i_j}^{n_{i_j}}.\;\;$ qed.