It is easy to prove that the division is impossible if $\,3\,$ doesn't divide the lead coef of $\,f.\,$
For $\ f \equiv (3x\! +\! 1)q + r\pmod{\color{#c00}9},\ r\in \Bbb Z\,$ $\Rightarrow$ $\ f = (3x\!+\!1)q + r + \color{#c00}{9g}\ $ for $\,q,g\in \Bbb Z[x]\,$ therefore $\, {\rm mod}\ 3\!:\ f\equiv q+r\,$ has reduced degree $(\le \deg q),\,$ so the lead coef of $\,f\,$ is $\,\equiv 0$
The same idea works more generally to disprove certain nonmonic divisions.
Remark $ $ The division algorithm works for nonmonic divisors too if one scales the dividend by a (sufficiently large) power of the lead coeff of the divisor, see the nonmonic division algorithm. In your example this amounts to scaling the division by $3^4$ to make everything integral. Whether or not this proves useful depends on the context.