Let $R$ be a commutative ring with unity. Let $A$ and $B$ be commutative $R$-algebras. Let $\varphi: A \to B$ be an $R$-algebra homomorphism which is an epimorphism. Let $J \subseteq B$ be an ideal. Assume that $\varphi^{-1}(J) = \{0\}$. Does it follow that $J = \{0\}$?
Here, I mean an epimorphism in the sense that for every commutative $R$-algebra $C$ and any two maps $\psi_1, \psi_2: B \to C$ with $\psi_1 \circ \varphi = \psi_2 \circ \varphi$, it follows that $\psi_1 = \psi_2$. In particular, an epimorphism does not need to be surjective.
At the very least, this is true in the following cases:
If $K \subseteq A$ is an ideal and $\newcommand\quotient[2]{{^{\Large #1}}/{_{\Large #2}}} \pi: A \to \quotient{A}{K}$ is the natural projection, this is true since it follows that $K = \operatorname{ker}(\pi) = \pi^{-1}(\{0\}) \subseteq \pi^{-1}(J) = \{0\}$, so that actually $\pi$ is just the identity.
If $S \subseteq A$ is a multiplicatively closed subset and $\iota: A \to S^{-1} A$ is the natural inclusion, this is true because we have $J = \langle \iota(\iota^{-1}(J)) \rangle = \langle \iota(\{0\}) \rangle = \{0\}$.
Geometrically, this should mean the following: If a map $f: Y \to X$ is injective and $A \subseteq Y$ is a closed subset of $Y$ such that the image $f(A)$ of $A$ under $f$ is all of $X$, then $A$ must have already been all of $Y$.