Towards the end of parshas Miketz (Bereishit 43:34), it mentions that the brothers drank with Yosef. Considering that as far as the brothers knew, they were surrounded by idol-worshipers, were they allowed to drink? Obviously, this is all pre-Matan Torah, but from from a biblical or rabbinical standpoint, was there an issue of yayin nesech or the like?
Imrei Baruch says the following answers to your question.
A: Chizkuni - The brothers drank since at that moment there was no Gezaira (decree) yet for Stam Yainom (non-Jewish wine).
B: Medrosh Talpios: They drank out of "Aimas Hamalchus" (fear of the king)
C: He goes on to say that the brothers considered themselves as Bnai Noach and thus together with "Aimas Hamalchus" felt it was the proper thing to do in this case.
Update: The answer below deals with yayin nesech and does not speak about "Stam Yanom" because it did not apply at thet time.
Note that it says in 43:32 it says
וַיָּשִׂימוּ לוֹ לְבַדּוֹ וְלָהֶם לְבַדָּם וְלַמִּצְרִים הָאֹכְלִים אִתּוֹ לְבַדָּם כִּי לֹא יוּכְלוּן הַמִּצְרִים לֶאֱכֹל אֶת הָעִבְרִים לֶחֶם כִּי תוֹעֵבָה הִוא לְמִצְרָיִם:
And they set for him separately and for them separately, and for the Egyptians who ate with him separately, because the Egyptians could not eat food with the Hebrews, because it is an abomination to the Egyptians.
Rav Hirsch points out that Yosef had maintained the appropriate standards and had trained the Egyptians on how to serve the food. Similarly "by themselves" would mean that they would ensure that the brothers received the proper food and would have shown them that they were preparing it "properly".
The brothers would not have relied on Yosef's authority, but the Egyptians would have called in one of the brothers to certify that it was done properly, just as they would have called in one of an ambassador's staff for his meal.
As a cosmopolitan empire they would be well trained in how to serve guests of all nations and beliefs. Consider the modern state dinners in the White House where the Arab ambassadors are served Hallal and the Israeli Ambassador is served Kosher food, even if in private life they do not keep the religious restrictions.
Logically, they would not serve wine that had been "sanctified" to their avodas zarah as that was "toevah" for them. This would mean that the brothers would have been carefully served wine that was not yayin nesech.
That is, unlike some avodas zarah nowadays, who first place food and drink in front of an idol (as happened to a Jerusalem restaurant), before giving it to the regular people, the Egyptians (since it was a toevah) would never have dared insult the "gods" in this way. That is, serving "infidels" food or drink that had also been offered to the "gods" would be an insult to the "gods" and punished as such (according to their belief).
UPDATE: As an example, the yayin nesech (libations) offered to the "gods" by the Greeks (as shown in the Odyssey) were offered by individuals just before they drank. The wine was not poured as a libation while it was stored or or being brought to the banquet.
The "consecrated" wine used by the church nowadays is never served in any way other than as part of the "service".
Thus we see that the brothers did not have to worry about yayin nesech at that time.
The Rambam says in a responsum (p'er Hador) that the Avos DIDNT keep the Torah. THis can also be inferred from his words in the begining of the 9th chapter of hil. melachim (note Lechem Mishnah thereon). However, rational mitzvos they presumably still kept. Thus the Rambam's world who are staunchly opposed to drinking (see hil. de'os 5:3, for example) have the problem that the brothers drinking was obscene if not technically forbidden. Thus R. Avraham Ben HaRambam approvingly cites R. Shmuel Bar Chofni Gaon who explains that they only got a little drunk, but not to the point that they lost the ability to think straight.
It might very well have been beer.