Quantum solutions of a time-dependent Hamiltonian for the motion of a time-varying mass subjected to time-dependent singular potentials in three dimensions are investigated. A time-dependent inverse quadratic potential and a Coulomb-like potential are considered as the components of the singular potential of the system. Because the Hamiltonian is a function of time, special techniques for deriving quantum solutions of the system are necessary. A quadratic invariant operator is introduced, and its eigenstates are derived using the Nikiforov-Uvarov method together with a unitary transformation method. The Nikiforov-Uvarov method enables us to solve the eigenvalue equations of the invariant operator, which are second-order linear diffierential equations, by reducing the original equation to a hypergeometric type. According to the invariant operator theory, the wave functions of the system are represented in terms of the eigenstates obtained in such a way. The difference of the wave functions from the eigenstates of the invariant operator is that the wave functions have time-dependent phases while the eigenstates do not. By determining the phases of the wave functions via the help of the Schrödinger equation, we identify the full wave functions of the system and address their physical implications.