I want to prove the following theorem:
Theorem. The minimal polynomial of $\alpha$ has integer coefficients if and only if $\alpha$ is an algebraic integer.
Here is what I have done and I want to ask whether it has any problematic parts or not:
($\implies$) part is trivial. For the converse, let $q(X) \in \mathbb{Q}[X]$ be the minimal polynomial of $\alpha$ and $f(X) \in \mathbb{Z}[X]$ such that $f(\alpha)=0$. Then, since $q(X)$ is the minimal polynomial of $\alpha$, $f(X)=q(X)r(X)$ for some $r(X) \in \mathbb{Q}[X]$.
Assume that $q$ has at least one non-integer coefficient. Define
$ V = lcm\{$denominators of coefficients of $q(X) \}$.
$ U = lcm\{$denominators of coefficients of $r(X) \}$. Then,
$UVf(X) \equiv 0$ modulo ($UV$) but $Vq(X)Ur(X) \equiv UVq(X)r(X) \not \equiv 0$ . So, I think we are done.
Essentially, the lemma we need to prove is:
I'll try my best to guide you through a proof that incorporates as many of your ideas as possible.
Define $V$ and $U$ to be the smallest positive integers such that $Vq(X) \in \mathbb Z[X]$ and $Ur(X) \in \mathbb Z[X]$. I invite you to check that the greatest common divisor of the coefficients of $Vq(X)$ is one. The same is true of the coefficients of $Ur(X)$. While checking this, it is important to think about why we need $q(X)$ and $r(X)$ to be monic.
Suppose, for contradiction, that $V > 1$. Then there exists a prime number $p$ that divides $V$. Consider the equation $$ (Vq(X))(Ur(X)) = UVf(X)$$ as an equation in $\mathbb Z_p[X]$. I encourage you to show that $UVf(X)$ is zero in $\mathbb Z_p[X]$, and that $Vq(X)$ and $Ur(X)$ are non-zero in $\mathbb Z_p[X]$.
Finally, you can think about how this contradicts the fact that $\mathbb Z_p[X]$ is a integral domain, and hence, conclude that $V = 1$.
So the idea of this argument is very similar to your argument, except that we are working in $\mathbb Z_p[X]$ rather than $\mathbb Z_{(UV)}[X]$. The latter is not necessarily an integral domain, and that is the important difference.