This is an exercise from Grillet's "Abstract Algebra" (page $145$, proposition $10.10$).
Let $R$ be an integral domain, let $I$ be an ideal of $R$, and let $\pi\colon R\to R/I$ be a canonical projection. If $f(x) = a_0 + ... + x^n \in R[x]$ and $\pi(a_0) + ... + \pi(1)x^n = (a_0 + I) + ... + (1 + I)x^n$ is irreducible in $(R/I)[x]$, then $f(x)$ is irreducible in $R[x]$.
My supposed proof:
Let $f(x) = g(x)h(x)$ where $g(x) = b_0 + ... + b_rx^r$ and $h(x) = c_0 + ... + c_sx^s$. Then $b_rc_s = 1$. Also, $(a_0 + I) + ... + (1 + I)x^n = (b_0c_0 + I) + ... + (b_rc_s + I)x^n = ((b_0 + I) + ... + (b_r + I)x^r)((c_0 + I) + ... + (c_s + I)x^s)$, hence at least one of $((b_0 + I) + ... + (b_r + I)x^r)$ and $((c_0 + I) + ... + (c_s + I)x^s)$, say, $g(x)$ is a unit. Since units of $(R/I)[x]$ are precisely units of $R/I$, we in particular have either $b_r \in I$ or $r = 0$. In the first case, as $I$ is an ideal, we have $1 = b_rc_s \in I$ and hence $I = R$. The polynomial in question is trivially irreducible in $R/R \cong \{0\}$ since every element of $\{0\}$ is trivially a unit. In the second case, $g(x) = b_r$ is a unit of $R$, hence a unit of $R[x]$.
However, the proof seems quite trivial. I wonder if I'm missing something.
Yes, you are missing some things (ie. the proof is not correct). Some comments:
The goal is to assume that $f$ is irreducible in $(R/I)[x]$, then show that $f$ reducible in $R[x]$ results in a contradiction, thus proving that $f$ had to be irreducible in $R[x]$.
In the case where $R=I$, you have not shown this contradiction - you have argued that $f$ is irreducible in $(R/I)[x]$ (actually, $0$ isn't irreducible - we usually exclude $0$ in the definition of an irreducible polynomial). Further, even if $f$ were irreducible in $(R/R)[x]$, this could never imply $f$ irreducible in $R[x]$, for arbitrary $f$ (otherwise every $f$ would be irreducible). So this should tell us that something has gone wrong.
As pointed out by Tobias Kildetoft in the comments, altogether we have simply that the theorem is vacuously true in the case $(R/R)[x] = {0}$, because there are no irreducible polynomials in $(R/R)[x]$ (there could never be a counterexample where $f$ is irreducible in $(R/R)[x]$, but reducible in $R[x]$).
The second case is also not done correctly: you have shown that $g(x)$ is a unit in $(R/I)[x]$. But this does not mean it was a unit in $R[x]$ (it is easy to construct a counterexample: $3$ is a unit in $\mathbb{Z}_5[x]$, but $3$ is not a unit in $\mathbb{Z}[x]$). However, I think you have already done enough to prove the second case - could you complete the proof?