שולחן ערוך, יורה דעה שע״ב

Shulchan Arukh, Yoreh De'ah 372

היתר טומאה במקום מצוה ודין קברי עובדי כוכבים. ובו ב' סעיפים:
אף על פי שהכהן אסור ליכנס לבית הפרס (פי' שדה שאבד בה קבר ושנחרש בה קבר ושיעורה מאה אמה) או לארץ העמים אם צריך לילך שם לישא אשה או ללמוד תורה ואין לו דרך אחרת יכול לעבור דרך שם אפילו אם מוצא ללמוד במקום אחר וכן אבל העובר דרך שם יכול לילך אחריו לנחמו וכן מטמא בטומאה של דבריהם לדון עם עובדי כוכבים ולערער עמהם מפני שהוא כמציל מידם וכן כל כיוצא בזה: הגה כהן ששוכב ערום והוא באהל עם המת ולא ידע אין להגיד לו אלא יקראו לו סתם שיצא כדי שילביש עצמו תחלה אבל אם כבר הגידו לו אסור להמתין עד שילביש עצמו ודוקא אם הוא באהל המת שהוא טומאה דאורייתא אבל אם הוא בבית הפרס או ארץ העמים שהיא טומאה דרבנן ילביש עצמו תחלה דגדול כבוד הבריות (ת"ה סימן רפ"ה) כמו שנתבאר לעיל סימן ש"ג לענין כלאים. כהן שהוא ישן ומת עמו באהל צריכין להקיצו ולהגיד לו כדי שיצא (תשובת מהרי"ל סימן ס"ט):
In spite of the fact that the Kohen is prohibited to enter a Peras-area, i.e., a field in which there was a lost grave or in which a grave had been ploughed up and the extent [of the prohibited area being] a hundred cubits [in every direction], or the country of the heathens, — if he must go there [in order] to take a wife or to study Torah, and he has no other road, he may pass through there, even if he can manage to study elsewhere. And so too, [with respect to] a mourner who passes through there, — [the law is that] he may go after him to console him. Likewise, may he incur uncleanness [which is forbidden] by a Rabbinical decree, [viz., by going] to argue [matters] with heathens and to contest [in court the legality of their acts], for he is as one who saves [his property] from their hand, and so also anything that is similar to this. Gloss: A Kohen who lies undressed whilst in the [same] tent with a corpse and was not aware [of this], should not be informed thereof, but he should be called [out] without specifying [the reason thereof], so that he leave, [and the grounds for not specifying the reason being] in order that he dress himself first. But if they had already told him [the reason], he is forbidden to remain [there] until he dresses himself. And [this applies] only if he is in the corpse's tent, which is an uncleanness [forbidden] Biblically, but if he is in a Peras-area or in the country of the heathens, which is an uncleanness forbidden [only] Rabbinically, he should dress himself first, for human dignity [in proper appearance] is very important as has been explained supra § 303 regarding the subject of Kilay'im. A Kohen who was asleep and there was a corpse with him in the [same] tent must be awakened and told [about it] in order that he leave.
קברי עובדי כוכבים נכון ליזהר הכהן מלילך עליהם. (מהר"מ ותוס' פ' המקבל) (אע"פ שיש מקילין (רמב"ם והגמי"י בשם ס' יראים) ונכון להחמיר אבל קבר של מומר לעבודת כוכבי' מטמא כשל ישראל) (רשב"א סי' קצ"ד ורמ"ב):
[With respect to] the graves of heathens, it is proper for a Kohen to be careful not to walk upon them, although there are some [authorities] who adopt a lenient view. And it is proper to adopt the stringent view. However, the grave of an [Israelite] who was an apostate in respect of idolatry, imparts uncleanness as [the grave] of one who was a [conforming] Israelite.

Ashlei Ravrevei: Shulchan Aruch Yoreh Deah, Lemberg, 1888 (Public Domain) · Code of Hebrew Law by Chaim N. Denburg, Montreal, 1955 (CC-BY) · 2 se'ifim