Robert gives a thorough analysis of differential equations which one can write in terms of $\tau$ and $\kappa$, and the inherent limitations in this local approach. But maybe one can find more reasonable or useful conditions in terms of integral equations, and the whole problem could be much more interesting or natural if we consider closed curves. In short, a global approach could be more fruitful.
For instance, a necessary condition for a closed curve to lie on a sphere is that $\int \tau=0$, e.g. see p.171 of Millman and Parker, which incidentally turns out to characterize spheres. Furthermore, any closed curve lying on a convex surface must have at least $4$ points where $\tau=0$, which is a generalization of the classical four vertex theorem due to Sedykh; see also this paper for another proof. Another necessary condition for a curve to lie on an ellipsoid is that it have a pair of parallel tangent lines, which turns out to characterize ellipsoids, as described in this paper with Bruce Solomon.
It would be interesting to find more simple or nice necessary conditions for a closed curve to lie on an ellipsoid, and I think it is possible that a collection of these may turn out to be sufficient as well.