In classical mechanics, holonomic constraints are relations between the position variables (and possibly time) that can be expressed in the following form: $g(y,t) = 0$
Nonholonomic constraints is when we can't express it in the form given above, and have to express it as $g(y,y',t) = 0$, where y' must be a variable to the constraint.
But, be careful, even though some constraints giving in the form $g(y,y',t) = 0$, it does not mean it can't be converted to a holonomic constraints of form $g(y,t)-$constant$ = 0$. These constraints that can be converted are actually holonomic constraints.
Thus the constraints that cannot be reduced to holonomic constraints by integration are nonholonomic constraint.
Now let $g(x,\theta,\phi,t) = dx-a\sin\theta d\phi = 0$ be our constraint.
If the differential constraint was exact the it should be in the form of
\begin{equation}\frac{dg}{dt} = \frac{\partial g}{\partial x}\frac{dx}{dt} + \frac{\partial g}{\partial \theta}\frac{d\theta}{dt} + \frac{\partial g}{\partial \phi}\frac{d\phi}{dt} +\frac{\partial g}{\partial t} =0\end{equation}
which is just
\begin{equation}\frac{dg}{dt} =0\end{equation}
which can be integrated into
\begin{equation}g(y,t)-constant = 0\end{equation}
which is a holonomic constraint
Showing that no integral exists
By dividing $g(x,\theta,\phi,t)$ by $dt$ and add $0\frac{d\theta}{dt}$ thus we get:
\begin{equation}\frac{dx}{dt}-a\sin\theta\frac{d\phi}{dt}+ 0\frac{d\theta}{dt} = 0\end{equation}
I order for it to be exact, we must be able to get
\begin{equation}\frac{\partial g}{\partial x} = 1,\frac{\partial g}{\partial \theta} = 0,\frac{\partial g}{\partial \phi} = -a\sin\theta\,\frac{\partial g}{\partial t} = 0\end{equation}
Suppose we want to try integrate to get g that matches the above partial derivatives
Method 1
\begin{equation}\frac{\partial g}{\partial x} = 1\end{equation}
integrate with respect to $x$,
\begin{equation}g = x + k_1(\theta,\phi,t)\end{equation}
differentiate with respect to $\theta$,
\begin{equation}\frac{\partial g}{\partial \theta} = k'_1(\theta,\phi,t) = 0 \end{equation}
integrate with respect to $\theta$, then sub in for $k_1$,
\begin{equation}g = x + \theta + k_2(\phi)\end{equation}
differentiate with respect to $\phi$,
\begin{equation}\frac{\partial g}{\partial \phi} = k'_2(\phi,t) = -a\sin\theta\end{equation}
integrate with respect to $\phi$, then sub in for $k_2$,
\begin{equation}g = x + \theta + a\cos\theta + k\end{equation}
But if we take $\frac{\partial g}{\partial \theta} = -a\sin\theta + 1\neq 0$ thus NOT integrable.
Method 2
Or we could simply do the exact check
\begin{equation} \left(\frac{\partial g}{\partial y_i}\right)_{y_j} = \left( \frac{\partial g}{\partial y_j} \right)_{y_i}\end{equation}
and immediately we can see that
\begin{equation} \left(\frac{\partial g}{\partial \phi}\right)_{\theta} = -a\cos\theta \neq 0 =\left( \frac{\partial g}{\partial \theta} \right)_\phi\end{equation}
which fails the exact check and thus NOT integrable.