Hint:
Recall the formula:
$$
\mathrm{d}\omega(X,Y) = X\cdot \omega(Y) - Y\cdot \omega(X) - \omega\left([X,Y]\right).
$$
This tells us that, if $X$ and $Y$ are in the kernel of $\omega$ (that is, if $\omega(X) = \omega(Y) = 0$):
$$
\mathrm{d}\omega(X,Y) = - \omega([X,Y]).
$$
Can you go on from there ?
Edit:
Suppose $(X,Y,Z)$ are -locally- linearly independant. They form a basis of $\mathbb{R}^3$. If $X$ and $Y$ are in $\ker \omega$, it follows that:
$$
\omega \wedge \mathrm{d}\omega \left( X,Y,Z\right) = \pm \omega(Z) \mathrm{d}\omega(X,Y) = \mp \omega(Z) \omega([X,Y])
$$
where the $\pm$ and $\mp$ are here because I don't really want (and care about) the exact sign. As $\omega$ is supposed non-zero (its kernel $\ker \omega = \mathrm{span}(X,Y)$ is two dimensional) and as $X,Y,Z$ are linearly independant, $\omega(Z) \neq 0$. Therefore:
\begin{align}
\omega\wedge\mathrm{d}\omega = 0 &\iff \omega\wedge \mathrm{d}\omega(X,Y,Z)= 0 \\
& \iff \omega(Z)\omega([X,Y]) = 0 \\
& \underset{\omega(Z)\neq 0}{\iff} \omega([X,Y]) = 0 \\
& \iff [X,Y] \in \ker \omega \\
& \iff [X,Y] \in \mathrm{span}(X,Y).
\end{align}
This is a particular case of the Frobenius integrability theorem (in dimension 3).