A model of self-propelled motion in a closed compartment containing simple or complex fluids is formulated in this paper in terms of the dynamics of a point particle moving in a spherical cavity under the action of random thermal forces and exponentially correlated noise. The particle's time evolution is governed by a generalized Langevin equation (GLE) in which the memory function, connected to the thermal forces by a fluctuation-dissipation relation, is described by Jeffrey's model of viscoelasticity (which reduces to a model of ordinary viscous dynamics in a suitable limit). The GLE is transformed exactly to a Fokker-Planck equation that in spherical polar coordinates is in turn found to admit of an exact solution for the particle's probability density function under absorbing boundary conditions at the surface of the sphere. The solution is used to derive an expression (that is also exact) for the survival probability of the particle in the sphere, starting from its center, which is then used to calculate the distribution of the particle's first-passage times to the boundary. The behavior of these quantities is investigated as a function of the Péclet number and the persistence time of the athermal forces, providing insight into the effects of nonequilibrium fluctuations on confined particle motion in three dimensions.