I don't think this is true. I'm under the impression that in situations such as an ectopic pregnancy, the fetus can be aborted because there is absolutely no chance it can survive.
Catholic teaching prohibits the intentional killing of the child for any reason, whether as a means or an end. If the mother's life is in danger, it is permissable to give the mother medical treatment which, as an undesired and unavoidable side effect, causes the death of the child.
For example, in the case of an ectopic pregnancy, the affected Fallopian tube, with the embryo inside, can be surgically removed. The intent is to remove the diseased organ, not to kill the baby. But there (currently) is no way to do one without also causing the other. Theologians don't consider that "abortion," because the intent to kill the baby doesn't exist.