[guided]The first technical point is that a quadratic form may have a radical. We name it explicitly: the associated symmetric bilinear form is
\begin{align*}
B_q: \mathbb{Q}^n \times \mathbb{Q}^n &\to \mathbb{Q}, \\
(x,y) &\mapsto \frac{1}{2}\bigl(q(x+y)-q(x)-q(y)\bigr),
\end{align*}
and its radical is
\begin{align*}
R = \{x \in \mathbb{Q}^n : B_q(x,y)=0 \text{ for every } y \in \mathbb{Q}^n\}.
\end{align*}
For any $r \in R$, the polar identity evaluated at $(r,r)$ gives
\begin{align*}
B_q(r,r)=\frac{1}{2}\bigl(q(2r)-2q(r)\bigr)=\frac{1}{2}\bigl(4q(r)-2q(r)\bigr)=q(r),
\end{align*}
where the equality $q(2r)=4q(r)$ is the homogeneity of a quadratic form. Since $r \in R$ implies $B_q(r,r)=0$, every vector in the radical satisfies $q(r)=0$. Therefore, if $R$ contains a nonzero vector, the theorem is already proved: that vector lies in $\mathbb{Q}^n \setminus \{0\}$ and is a rational zero of $q$.
Thus the only remaining case is $R=\{0\}$. This means precisely that the polar form $B_q$ has zero radical, so $q$ is nonsingular. We set $W:=\mathbb{Q}^n$ and $q_W:=q$; this keeps the notation compatible with the final transportation step while making clear that no local isotropic vector has to be projected away from a radical component.
Now we use the standard diagonalization theorem for quadratic forms over fields of characteristic not equal to $2$. Since $\operatorname{char}(\mathbb{Q})=0$, the theorem applies and gives a basis $e_1,\dots,e_m$ of $W$ and coefficients $a_1,\dots,a_m \in \mathbb{Q}^{\times}$ such that the map
\begin{align*}
Q: \mathbb{Q}^m &\to \mathbb{Q} \\
X=(X_1,\dots,X_m) &\mapsto a_1X_1^2 + \cdots + a_mX_m^2
\end{align*}
is isometric to $q_W$. An isometry is an invertible rational linear change of variables, so it carries nonzero zeros to nonzero zeros over $\mathbb{Q}$ and, after extending scalars, over $\mathbb{R}$ and every $\mathbb{Q}_p$. Therefore the remaining problem is exactly the nonsingular diagonal case.[/guided]