Sure but when they are validly baptised as a Catholic then they become incorporated into the Church as members of the body of Christ. Nothing can ever change this; even when someone has formally defected, and returned, they aren’t re-baptised but only have to make a profession of faith - reaffirming publicly that they are part of the Church (and always have been). If they’re in danger of death, even a person who has left the Church can receive the sacraments (if they so wish) - something that couldn’t happen if they were no longer Catholic.