A one-dimensional Schrödinger equation with position-dependent effective mass in the kinetic-energy operator is studied in the framework of an so(2,1) algebra. New mass-deformed versions of Scarf II, Morse, and generalized Pöschl-Teller potentials are obtained. Consistency with the intertwining condition is pointed out.