The pre-image of an irreducible element. 
Problem: Let $ R,S $ be integral domains and $ f: R \to S $ a unit-preserving homomorphism. Assume that $ x \in S $ is irreducible. Then does the pre-image $ {f^{-1}}[\{ x \}] $ contain only irreducible elements?

My research effort
Assume that $ f(x) $ is irreducible and $ x = y \cdot z $. Then $ f(x) = f(y \cdot z) = f(y) \cdot f(z) $. Hence, either $ f(y) $ is invertible or $ f(z) $ is invertible. However, this does not imply that either $ y $ or $ z $ is invertible. For example, $ 5 $ is irreducible (hence not a unit) in $ \mathbb{Z} $, but its image $ \bar{5} $ in $ \mathbb{Z} / 7 \mathbb{Z} $ is a unit.

Could anyone tell me if the statement is true/false and give a hint for a proof/counterexample?
 A: The statement is not true, i.e. a non-irreducible element can be mapped to an irreducible element.
Hint: 
Think of embedding $f$ of $R$ into some localization of $R$ (by some multiplicative set) and the fact that some element $y$ of the localization usually is a unit despite the fact that $f^{-1}(\{y\})$ is not. Such $y$ can be then used to find counterexample.
More detailed hint:
Ok, so I would still use the localization example, but in a concrete situation to make it clear.
Let $f$ be an embedding of the ring $\mathbb{Z}$ to the following subring of $\mathbb{Q}$:
$$ S=\{ \frac{a}{2^k} \; | \; a\in \mathbb{Z}, k \in \mathbb{N}_0 \}.$$
Try to find the example in this situation. That is, try to find an integer which is a product of at least two primes, but is irreducible as an element of the ring $S$.
A: The statement is correct if both $R$ and $S$ are local rings and if $f$ is a homomorphism of local rings, i.e. $f(\mathfrak{m}_{R}) \subset \mathfrak{m}_{S}$, where $\mathfrak{m}_{R}, \mathfrak{m}_{S}$ denotes the maximal ideal of $R$, $S$, respectively.
Proof: The set of non-units in $R$ is the maximal ideal $\mathfrak{m}_{R}$. Since $f(\mathfrak{m}_{R}) \subset \mathfrak{m}_{S}$, it hence follows that if $a$ is a non-unit then $f(a)$ is a non-unit. Let $b\in S$ be irreducible. Suppose that there exists an $x\in f^{-1}(b)$ which is reducible. Then there exist $y, z \in \mathfrak{m}_{R}$ so that $x = y \cdot z$, which yields a factorization of $b= f(x) = f(y) \cdot f(z)$, and since neither $f(y)$ nore $f(z)$ is a unit, this gives contradiction to the irreducibility of $b$.
