Inevitably, something happens where I need to separate one fish from the others; either a sick fish that needs medication before I (flush it - in my opinion), or a mama having babies; the babies themselves; it's always something, as Roseanne Roseannadanna used to say.
To keep the bacteria going, though, you might want to keep a small group of non-baby eating, very hardy fish that can take the medications you may give another sick fish, and that will not eat babies. Cories are good, a pleco for the algae (get one that stays little), a horseface loach, kuhlii loach, or banjo cat would all be good choices for keeping it cleaned up.