First $f$ is monic, then the division with remainder always works on any commutative ring with identity. For any $g\in R[x]$, we have $q,r\in R[x]$ so that
$$g=fq+r,\quad \deg r<\deg f$$
This could be proved by induction on the degree of $g$. Using this assertion, we can easily prove that in any equivalent class of $R[x]/\langle f(x)\rangle$, there's a polynomial whose degree is smaller than $f$. This can be the represention element. (However no use for your problem.)
Now for your problem. In order to make $g(x)$ meet the requirements, there should be
where $h\in R[x]$. If the conclusion is false, then we can decompose $f$ into two relatively prime factors: $f(x)=p(x)q(x)$ (because of unique factorization). $p,q$ are both monic, and neither of them is $1$. Then by Bézout's Identity we have
Now we let $g=pu$, and $h=uv$. You can verify that the equivalent class contianing $g$ cannot be $0$ nor $1$, where contradiction gained.
The most important part is Bézout's Identity, and it works in any principal ideal ring, no need for the ring to be a field.