Perhaps I am missing something really obvious, but what I do know is that for some $p,q\in\mathbb{Z}$ such that $r=p/q$ with $q\neq0$, we have that $r^2=p^2/q^2$.
Furthermore, the only way $p^2/q^2$ can be an integer is if $q^2 \mid p^2$; thus, there exists $k\in\mathbb{Z}$ such that $p^2/q^2=k$. If we prove that such $k$ is a perfect square (except when $r=0$, which is a trivial case) then we are finished.
Is there another way to prove this or is it possible to prove that $k$ is in fact a perfect square?