If a seriously ill pregnant woman needs life-saving medical treatment which may, as a secondary effect, put the life of her baby at risk, such treatments are always ethically permissible provided every effort has been made to save the life of both mother and baby.
Abortion is the direct and intentional ending of the life of an unborn baby.
The Catholic Church upholds that necessary medical intervention to save the life of a pregnant woman, which results in the untended death of her unborn baby, is never considered an abortion.