ERD: “In case of extra-uterine pregnancy, no intervention is morally licit which constitutes a direct abortion.” [USCCB, Ethical and Religious Directives, n. 48.]
An ectopic pregnancy represents a difficult moral situation. But the USCCB is expressing the constant teaching of the Church in that the ERD disallows any type of direct abortion. If a woman has an ectopic pregnancy, sometimes the prenatal dies on its own, because the human body cannot support a pregnancy other than in the womb. But if the prenatal continues to grow, endangering the life of the mother, even so, no intervention that directly kills the prenatal would be morally licit. For example, the physician may not use any type of abortive drug, nor may a surgeon directly kill the prenatal.
However, in my theological opinion, the medical disorder in the case of ectopic pregnancy is that the prenatal is in the wrong location in the body. Therefore, removing the prenatal from that location, by surgery, is a direct treatment of the disorder, making the moral object good. Ideally, the prenatal would be removed from the wrong location, and moved to the right location, the womb. But at the present time, this type of transfer is not medically possible. Perhaps in the future, medicine will have this capability. For the present time, if the prenatal cannot survive in its ectopic location, I believe it is moral to remove the prenatal from that location, in order to save the life of the mother, as a type of indirect abortion. However, the Magisterium has no specific teaching on this point, as far as I know.
Please take a look at this list of my books and booklets, and see if any topic interests you.