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 if we consider *closed* curves.

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][1], 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][2]; see also this [paper][3] 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][4]. 

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 necessary as well.


  [1]: https://www.amazon.com/Elements-Differential-Geometry-Richard-Millman/dp/0132641437
  [2]: https://londmathsoc.onlinelibrary.wiley.com/doi/pdf/10.1112/blms/26.2.177
  [3]: https://arxiv.org/abs/1704.00081
  [4]: https://arxiv.org/abs/math/0205222