The principle of double effect holds for these sort of cases, where an action is taken with two effects; one good, one bad.
Each case is different, but the general principle is that no action can be undertaken to directly and intentionally kill (abort) the unborn.
Contrast the case where a pregnant woman has uterine cancer, and both will die without medical intervention to a case where a pregnant woman has a severe cardiac condition.
In the case of the uterine cancer, the intended effect is to effect a cure through removal of the cancerous uterus, and the death of the embryo is an expected and unintended effect. Such is permissible.
In the case of the pregnant cardiac patient, an abortion would not treat the cardiac disease, nor is it a certainty that she would not survive a C-section or childbirth. The intent of the action, although to help the patient, is also to remove the fetus/embryo, whereas in the uterine cancer patient, the intent is to remove the cancerous uterus.
Again, every case is different. In the case of the pregnant teen with lymphoma, **assuming **that she could be cured or put into remission with medical treatment and **assuming **that such would have a high probability or certainty of death to the embryo, it may have been morally permissible to have the chemo although as an unintended but foreseeable second effect the embryo/fetus would die.
It’s difficult sometimes to discuss generalities with specific cases, since there are usually unknowns; which type of lymphoma did the teen have? Was she likely to be cured or put in remission with treatment? What type of treatments were available to her? Did she have an understanding of her medical condition? What role did her parents have? Her doctor(s)?
In order to discuss moral generalities, one has to make at least a few assumptions regarding the circumstances of a particular case. In the question of “does the Church allow for abortion in the case when a mother’s life is in danger?”, the answer is no, if we define abortion as the direct, intentional termination of the life of the unborn. If we change that definition, such as with “indirect abortion” (unintentional), then the answer becomes “it depends on the circumstances and intentions”.