Is it safe to take medications containing alcohol while pregnant?

Yes. Usually the medications that contain alcohol are cough suppressants and such. When used as recommended and for short duration it is ok.
Probably not. Many things can be risk factors during pregnancy- not the least of which is alcohol. Pregnant women should refrain from any alcohol use. The minute amounts actually contained in medications probably would not be that significant so should pose reduced risk. But alcohol free medications would be preferred.