We analytically calculate the spin-dependent electronic conductance through a one-dimensional ballistic ring in the presence of an inhomogeneous magnetic field and identify signatures of geometric and Berry phases in the general nonadiabatic situation. For an in-plane magnetic field, we rigorously prove the spin-flip effect presented by Frustaglia et al. [Phys. Rev. Lett. 87, 256602 (2001)], which allows us to control and switch the polarization of outgoing electrons by means of an Aharonov-Bohm flux, and derive analytical expressions for the energy-averaged magnetoconductance. Our results support numerical calculations for two-dimensional ballistic rings presented in the second paper [Frustaglia et al., following paper, Phys. Rev. B 69, 155327 (2004)] of this series.