A curve or path in three dimensions is given by the parametric equations x= f(t), y= g(t), z= h(t) for f, g, and h functions of the single variable t. The integral of a vector function, u(x,y,z)i+ v(x,y,z)j+ w(x,y,z)k on that path is \int u(f(t), g(t), h(t)dx+ v(f(t), g(t),h(t))dy+ w(f(t),g(t),h(t))dz.
That path will be on the surface of the sphere x^2+ y^2+ z^2= a^2 if and only if f(t)^2+ g(t)^2+ h(t)^2= a^2 for all t.
I have avoided using the term "line integral" because, of course, a straight line cannot lie on the surface of a sphere.