Is it safe to take ramipril while pregnant?

Not so much. The ace inhibitor meds which include ramipril are considered category c (possibly safe) in the first trimester but move into category d later in pregnancy because of increased fetal & neonatal problems. Some can pass in breast milk but risk in breast feeding is considered minimal.
No. Ramipril is a medication for blood pressure. It is a drug from a class of medications called ace inhibitors. These medications have been linked to birth defects. If you are on an ace inhibitor, you should not get pregnant. See your doctor if you are considering pregnancy and need the medication. They can switch you to a safer medication.