There is a straightforward way to deduce necessary conditions for a space curve to lie on an ellipsoid, and it's really a matter of calculation to make these conditions explicit in terms of the curvature and torsion.  I'll describe how to do this and the result of the calculation below, but first let me insert a note of caution about the 'necessary and sufficient conditions' that the OP wants.

When a space curve is *fully nondegenerate*, i.e., its curvature and torsion are nowhere vanishing, the necessary and sufficient condition for the curve to lie on a sphere is that the expression $((\kappa')^2 + \kappa^2\tau^2)/(\kappa^4\tau^2)$ should be constant.  Indeed, when it is constant, this expression is just the square of the radius of the sphere on which the curve lies.  Now, any curve that lies on a sphere has positive curvature $\kappa$, but it need not have nonvanishing torsion $\tau$, of course.  Thus, the above criterion does not make sense for all *nondegenerate* curves, i.e., space curves for which $\kappa$ is positive (which are the curves for which the classical Frenet frame is well-defined).  The following argument shows that one cannot hope to have a necessary and sufficient condition expressed in terms of local conditions for spherical curves that works for all *nondegenerate* space curves:  Consider two distinct spheres $S_1$ and $S_2$ that intersect along a circle $C$.  It is easy to construct a smooth curve $x(s)$ with positive curvature $\kappa$ that starts out on $S_1$ (but not on $S_2$), runs along $C$ for some interval, and then continues on $S_2$ (after leaving $S_1$).  This curve is locally spherical, but not globally spherical, so no local condition can be necessary and sufficient for all nondegenerate space curves. 

The reader may ask, "What about assuming real-analyticity?".  However, real-analyticity is not *necessary* for a space curve to be spherical, so this does not count as a local criterion that would be be part of a necessary and sufficient condition for any nondegenerate space curve to be spherical.  I think that the reasonable thing to do is to simply restrict to the class of *fully nondegenerate* space curves, for which a necessary and sufficient condition to be spherical is available.  (Alternatively, one could restrict to the space of real-analytic nondegenerate space curves, but then one has to make a special exception for the planar circles, since the above criterion does not make sense for them.) 

The seriousness of this problem becomes evident in the case of what we might call *ellipsoidal* space curves, i.e., the space curves that lie on some ellipsoid.  Now, even full nondegeneracy is not sufficient to avoid the above difficulty, for one can easily write down a pair of ellipsoids that intersect in a space curve that is not planar and hence contains fully nondegenerate arcs.  In particular, one can construct a fully nondegenerate space curve that is locally ellipsoidal but is not globally ellipsoidal.  Thus, even the right notion of 'nondegenerate' needs to be specified in order to get anywhere.

Here is what I propose:  Let $Q$ be the 10-dimensional vector space of quadratic functions on $\mathbb{R}^3$, i.e., functions of the form
$q = a_{ij}\,x^ix^j + 2b_i\,x^i + c$ for some constants $a_{ij}=a_{ji}$, $b_i$, and $c$.  For any smooth curve $\gamma:(a,b)\to\mathbb{R}^3$, let $Q^k_\gamma(t)\subset Q$ be the linear subspace consisting of those quadratic functions $q\in Q$ such that $q{\circ}\gamma$ vanishes to order at least $k$ at $t\in(a,b)$.  Then, for obvious reasons, $\dim Q^k_\gamma(t)\ge 10-k$ for $k\ge 0$.  

Let us say that $\gamma$ is *$Q$-nondegenerate* if $\dim Q^9_\gamma(t)=1$ for all $t\in(a,b)$.  It is easy to see that being $Q$-nondegenerate implies that $\gamma$ is fully nondegenerate (but is much stronger) and that being $Q$-nondegenerate can be expressed as the condition of non-simultaneous vanishing of a set of $9$ polynomials in $\kappa$ and $\tau$ and their derivatives with respect to arc-length up to order $6$ in $\kappa$ and $5$ in $\tau$.  Thus, it is an *open* condition on space curves.  Further, let us say that $\gamma$ is a *$Q$-curve* if it is $Q$-nondegenerate and $\dim Q^{10}_\gamma(t)=1$ for all $t\in(a,b)$.  This extra condition can be expressed as the vanishing of a certain polynomial $P$ in the $15$ variables $\kappa,\kappa',\ldots,\kappa^{(7)},\tau,\tau',\ldots,\tau^{(6)}$
that is of degree $27$ and has $8882$ monomial terms.  

One then has the following result:

**Theorem:**  A $Q$-nondegenerate space curve $\gamma$ lies on a (necessarily unique) quadric hypersurface if and only if it is a $Q$-curve.  Moreover, if it also satisfies a certain pair of strict inequalities on the curvature and torsion and their derivatives up to order $6$, then the quadric hypersurface on which it lies will be an ellipsoid.