Question:
Is this rule of יהרג ואל יעבר applicable today, and does it apply if you are being forced to have relations of an sort with a non-Jewish woman?
Answer:
This rule does apply nowadays and unfortunately was very applicable during the second world war. Regarding if there is יהרג ואל יעבור regarding a man with a gentile woman it is a machlokes Rishonim, however the Shach Y:D 157-12 and others say that there is. My assumption is that you are only asking a theoretical question, because we are obligated to do whatever possible not to come to such a situation. Additionally, I hope you understand that such a forum is definitely not the place for such serious question to be decided. Therefore what is being said here is only theoretical.
Best wishes
Sources:
Y:D 157-1, Chofetz Chaim Nidchei Yisroel 19, Machaneh Yisroel 15-2,