Starting in Genesis 12:13 Avraham and Sarah deceive Pharaoh into thinking that Sarah was not married. It seems from the verses that Avraham and Sarah understood that if Pharaoh thought Sarah was unmarried he would take her as a consort. My question is, given that adultery is one of the seven Noahide laws and one of the 3 transgressions for which one must give up one's life rather than violate, for what reason or by what right did Avraham and Sarah perpetrate this ruse? Shouldn't Sarah, under fear of rape/adultry have disclosed her relationship? And, shouldn't Avraham allowed himself to be killed, or perhaps at least wait until his life was threatened, before putting Sarah in that predicament?
Rav Hirsch explains on Lech Lecha 12:13 that they were actually in less danger this way than if they had admitted that they were married.
After all that occurred in Egypt and in the land of the Philistines we can conclude that - to which European countries in our modern times may not be without analogy - virgins, unmarried women were more protected against the prevailing immorality than married women. And add to that, a stranger! In both cases, married or unmarried, Sarah's honour was in danger. But, as a married woman the danger would be imminently threatening. One simply kills the objecting husband and rapes the wife. In the case of an unmarried girl accompanied by her brother one hopes to get her through the favor of that brother. In any case this way takes longer, postpones the matter, and in the meantime Hashem can help.
The Egyptians (even the nobles) would have thus, restrained themselves while they tried to get Avraham to agree. Once Par'o expressed an interest, they would have withdrawn and been careful not to offend someone that Par'o wanted to favor. Avraham was successful until Par'o decided to stop playing around and kidnap Sarah.
If Avraham had not taken this tack from the beginning, he would have been unable to make the claim later.
The point Rav Hirsch is making is that one is allowed to take steps in order to avoid being forced into a position of יהרג ואל יעבר. In the way the culture of the time behaved, what he did was to prevent them from being faced with rape/adultery in the first place. Even after she was kidnapped and taken to the palace, Par'o first tried to appease Avraham. Then Hashem intervened so that Sarah was never placed in the יהרג ואל יעבר situation.
The Zohar (part 1, 81b-82a) says that Avraham saw the Shechinah with Sarah, and therefore knew that she'd be safe:
רַבִּי יֵיסָא אָמַר יָדַע הֲוָה אַבְרָהָם דְּכֻלְהוּ מִצְרָאֵי שְׁטִיפִין אִנּוּן בְּזִמָּה, וְכֵיוָן דְּכָל הַאי יָדַע אַמַּאי לָא דָחִיל עַל אִתְּתֵיהּ דְּלָא אַהֲדַר מֵאָרְחָא וְלָא יֵיעוּל לְתַמָּן. אֶלָּא בְּגִין דְּחָמָא שְׁכִינְתָּא עִמָּהּ:
And the Midrash (Vayikra Rabbah 32:5) adds that her experience there enabled the Jewish women during the Egyptian exile to be protected from arayos:
רַבִּי הוּנָא בְּשֵׁם רַבִּי חִיָּא בַּר אַבָּא אָמַר שָׂרָה אִמֵּנוּ יָרְדָה לְמִצְרַיִם וְגָדְרָה עַצְמָהּ מִן הָעֶרְוָה, וְנִגְדְּרוּ כָּל הַנָּשִׁים בִּזְכוּתָהּ.