@Rithaniel Hmm, how did this go again. Let $R$ be a UFD and $K=\operatorname{Frac}(R)$. Let $P\in R[X]$, then $P\in K[X]$ and there it factors as $P=P_1\cdot...\cdot P_n$ with $P_1,...,P_n\in K[X]$ irreducible. Rewrite this as $c(P_1)\cdot...\cdot c(P_n)\cdot (P_1/c(P_1))\cdot...\cdot(P_n/c(P_n))$ ($c$ denotes content) up to a unit or whatever.
Gauß Lemma says that $c(P_1)\cdot...c(P_n)=c(P_1\cdot...\cdot P_n)=c(f)$ is in $R$ since the coefficients of $f$ are in $R$ and the polynomials $P_1/c(P_1),...,P_n/c(P_n)$ are primitive, hence in $R[X]$ and irreducible there as well. Now $c(P_1)\cdot…