It is not clear what you are asking. A line integral is a well defined concept in any number of dimensions, but it deals with integration over a one-dimensional curve. A sphere in three dimensions is two-dimensional.
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 [itex]\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[/itex].
That path will be on the surface of the sphere [itex]x^2+ y^2+ z^2= a^2[/itex] if and only if [itex]f(t)^2+ g(t)^2+ h(t)^2= a^2[/itex] 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.