Is $X$ irreducible in $R[X]$?
Let me summarize and give another answer, which the question has deserved.
Yes, this is correct. The claim does not follow unless we assume that $R$ is an integral domain. We can easily give examples, where $R$ is a commutative ring with zero divisors, and the claim is false. Let $n=ab$ be a composite number and take $R=\mathbb{Z}/n\mathbb{Z}$. Then $a,b$ are zero divisors in $R$, and we have $$ (ax+b)(bx+a)=(a^2+b^2)x. $$ If we can choose $a,b$ such that $a^2+b^2=1$ in $R$, then we obtain a counterexample. For example, take $(a,b)=(3,4)$ with $n=12$, or $(a,b)=(2,3)$ with $n=6$ (see the comment).
If $R$ is an integral domain, we have $\deg(fg)= \deg(f)+\deg(g)$ for $f,g\neq 0$. Then $x$ is irreducible.
In fact, one can prove the following theorem:
Thm. Let $A$ be a commutative ring with 1. Then $X$ is irreducible in $A[X]$ if and only if $A$ has no nontrivial idempotent elements (nontrivial meaning: different from $0$ and $1$)
Proof. I will prove in fact that $X$ is reducible if and only if $A$ has a nontrivial idempotent.
Assume that $e\in A$ is an idempotent different from $0$ and $1$. Then the polynomials $(1-e)X+e$ and $eX+(1-e)$ are nonzero, non invertible (otherwise their constant terms would be invertible, which would imply that $e=0$ or $1$, since $e(1-e)=0$). However, $((1-e)X+e)(eX+(1-e))=X$, so $X$ is reducible.
Assume now that $X$ is reducible. Notice that it is nonzero, and non invertible (since its constant term is not invertible). Hence $X=RS,$ where $R$ and $S$ are not invertible
Write $R=a+XP,S=b+XQ.$ We then have $X=ab+(aQ+bP)X+X^2PQ$.
Evaluation at $0$ yields $ab=0$. Therefore $X=(aQ+bP)X+X^2PQ$. Sicne multiplication by $X$ is injective, we get $$1=aQ+bP+XPQ.$$ Set $v=P(0)$ et $u=Q(0)$. Evaluation at $0$ yields $au+bv=1$. Set $e=au$. We have $$e^2=au (1-bv)=au-abuv=au=e,$$ hence $e$ is an idempotent.Assume that $e=0$. Then, $bv=1$, so $b$ is invertible and consequently $a=0.$
We then have $X=XPS$. Since multiplication by $X$ isinjective, we obtain $1=PS$, so $S$ is invertible, contradiction. Hence, $e\neq 0$. Similarly if $e=1$, then $au=1$ and we obtain this time that $R$ is invertible. Conclusion: $e$ is a nontrivial idempotent of $A$.