Ramban explains that “and their carcasses ye shall not touch” means that touching carrion causes ritual impurity and requires avoiding the Sanctuary and hallowed offerings, but is not itself a Scriptural prohibition punishable by lashes; the festival-related interpretation concerns the Rabbinic obligation to purify oneself before ascending to the Sanctuary.
וּבְנִבְלָתָם לֹא תִגָּעוּ - אֵינָהּ אַזְהָרָה לֶאֱסֹר לָנוּ הַנְּגִיעָה, אֲבָל יֹאמַר וּבְנִבְלָתָם לֹא תִגָּעוּ כִּי טְמֵאִים הֵם לָכֶם, כְּלוֹמַר לֹא תִגְּעוּ בָּהֶם בִּלְתִּי אִם תִּטַּמְּאוּ. וְהָעִנְיָן לוֹמַר שֶׁיַּחְשֹׁב כָּל נוֹגֵעַ בָּהֶם שֶׁהוּא טָמֵא וְיִזָּהֵר מִן הַמִּקְדָּשׁ וּמִן הַקֳּדָשִׁים. וְשֶׁמָּא הַמִּדְרָשׁ שֶׁאָמְרוּ רַבּוֹתֵינוּ (תורת כהנים פרק ד ט): "וּבְנִבְלָתָם לֹא תִגָּעוּ" בָּרֶגֶל, כְּלוֹמַר שֶׁלֹּא תִגְּעוּ בּוֹ בְּשָׁעָה שֶׁאַתֶּם חֲפֵצִים לִהְיוֹת טְהוֹרִים, כִּי טְמֵאִים הֵם וְלֹא תַּעֲלוּ בָּהֶם לָרֶגֶל. אֲבָל אֵין הַנְּגִיעָה נִמְנַעַת בְּלָאו, שֶׁאֵין הַנּוֹגֵעַ בִּנְבֵלָה בָּרֶגֶל מִן הַלּוֹקִין אֶת הָאַרְבָּעִים. וּמַה שֶׁאָמְרוּ (ר"ה טז): "חַיָּב אָדָם לְטַהֵר עַצְמוֹ בָּרֶגֶל" - מִצְוָה מִדִּבְרֵי סוֹפְרִים, וְאֵין בָּזֶה מִן הַתּוֹרָה עֲשֵׂה אוֹ לֹא תַעֲשֶׂה, זוּלָתִי מִצְוַת הָעֲלִיָּה. אוֹ שֶׁיְּהֵא "וּבְנִבְלָתָם לֹא תִגָּעוּ" בָּרֶגֶל - אַסְמַכְתָּא, כִּשְׁאָר אַסְמַכְתּוֹת הַרְבֵּה שֶׁשְּׁנוּיוֹת שָׁם בְּת"כ. וְעוֹד שָׁנוּי שָׁם (פרק ד י): אֲחֵרִים אוֹמְרִים: יָכוֹל אִם נָגַע אָדָם בִּנְבֵלָה יִלְקֶה אַרְבָּעִים? תַּלְמוּד לוֹמַר: "וּלְאֵלֶּה תִטַּמָּאוּ" (ויקרא י"א:כ"ד). יָכוֹל אִם רָאָה אָדָם אֶת הַנְּבֵלָה יֵלֵךְ וְיִטַּמֵּא? תַּלְמוּד לוֹמַר: "וּבְנִבְלָתָם לֹא תִגָּעוּ". הָא כֵיצַד? הֱוֵי אוֹמֵר: רְשׁוּת. וְזֶה עִקַּר הַדִּין מִן הַתּוֹרָה. וּלְאֵלֶּה תִּטַּמָּאוּ - לְאֵלֶּה הָעֲתִידִין לְהֵאָמֵר לְמַטָּה בָּעִנְיָן תִּטַּמָּאוּ (רש"י כאן) (ת"כ). כָּאן לִמֶּדְךָ שֶׁנִּבְלַת בְּהֵמָה טְמֵאָה מְטַמְּאָה, וּבָעִנְיָן שֶׁבְּסוֹף הַפָּרָשָׁה (ויקרא י"א:ל"ט) פֵּרֵשׁ עַל בְּהֵמָה טְהוֹרָה. לְשׁוֹן רַשִׁ"י (רש"י על ויקרא י"א:כ"ו) (בפסוק כו). וְאִם כֵּן, לָמָּה חִלְּקָן הַכָּתוּב וְלָמָּה פֵּרַט בָּהֶם? הָיָה רָאוּי שֶׁיֹּאמַר: "כָּל הַנּוֹגֵעַ בְּנִבְלַת בְּהֵמָה יִטְמָא עַד הָעֶרֶב, וְכָל הַנּוֹשֵׂא מִנִּבְלָתָהּ יְכַבֵּס בְּגָדָיו וְיִטְמָא עַד הָעֶרֶב". וְהַנָּכוֹן כִּי כָּאן הִזְכִּיר "בְּנִבְלָתָם" סְתָם וְלֹא הִזְכִּיר בָּהֶם מִיתָה, לְלַמֵּד שֶׁאֵין בָּהֶם שְׁחִיטָה, וְכָל הַנּוֹגֵעַ בָּהֶן בִּזְמַן שֶׁאֵינָם חַיִּים יִטְמָא. אֲבָל שָׁם אָמַר "וְכִי יָמוּת מִן הַבְּהֵמָה", לוֹמַר שֶׁאִם נִשְׁחֲטָה אֵינָהּ מְטַמְּאָה. וְעִנְיַן הַפָּרָשָׁה, הִזְכִּיר "וּלְאֵלֶּה תִּטַּמָּאוּ" לוֹמַר שֶׁאֵין בַּנִּזְכָּרִים בַּדָּגִים וּבָעוֹפוֹת וּבַחֲגָבִים הַטֻּמְאָה הַזּוֹ, רַק לְאֵלֶּה אֲשֶׁר יַזְכִּיר, וְהֵם הַבְּהֵמָה אֲשֶׁר אֵינֶנָּה שׁוֹסַעַת שֶׁסַע וּמַעֲלַת גֵּרָה. וְאָמַר (בפסוק כו) "טְמֵאִים הֵם לָכֶם כָּל הַנֹּגֵעַ בָּהֶם יִטְמָא" בַּטֻּמְאָה הַנִּזְכֶּרֶת. וְחָזַר וְאָמַר (בפסוקים כז-כח) שֶׁכָּל הוֹלֵךְ עַל כַּפָּיו בַּחַיָּה גַּם כֵּן יְטַמֵּא הַנֹּגֵעַ עַד הָעֶרֶב, וְהַנּוֹשֵׂא יוֹסִיף לְכַבֵּס בְּגָדָיו. וְכֵן "וְזֶה לָכֶם הַטָּמֵא בַּשֶּׁרֶץ" (ויקרא י"א:כ"ט) עַל הֶעָתִיד לְהַזְכִּיר. וְנִשְׁתַּבֵּשׁ רַבִּי אַבְרָהָם בְּכָאן. וְהִנֵּה לְמַעְלָה בְּעִנְיַן אִסּוּר הַמַּאֲכָל הִזְכִּיר הַבְּהֵמָה שֶׁאֵינָהּ שׁוֹסַעַת שֶׁסַע וּמַעֲלַת גֵּרָה, וְלֹא הִזְכִּיר הוֹלֵךְ עַל כַּפָּיו בַּחַיָּה. אוּלַי בַּעֲבוּר שֶׁאֵין דֶּרֶךְ לְאָכְלָם לֹא פֵּרַט בָּהֶם, וְהִנִּיחָם בְּתוֹךְ הַכְּלָל שֶׁאָמַר (ויקרא י"א:ג') שֶׁנֹּאכַל הַבְּהֵמָה הַמַּפְרֶסֶת פַּרְסָה וְשֹׁסַעַת שֶׁסַע וּמַעֲלַת גֵּרָה וְלֹא אַחֶרֶת, וְחַיָּה בִּכְלַל בְּהֵמָה, כְּמוֹ שֶׁנֶּאֱמַר "זֹאת הַבְּהֵמָה אֲשֶׁר תֹּאכֵלוּ, אַיָּל וּצְבִי וְיַחְמוּר" (דברים יד ד-ה). וּלְרַבּוֹתֵינוּ בְּתוֹרַת כֹּהֲנִים בַּפָּרָשָׁה כֻּלָּהּ מִדְרָשִׁים. "לְכָל הַבְּהֵמָה טְמֵאִים הֵם לָכֶם" (ויקרא י"א:כ"ו) - בְּאֵבֶר מִן הַחַי (פרשה ד ב). "וְכֹל הוֹלֵךְ עַל כַּפָּיו" - בְּאֵבֶר מִן הַמֵּת (פרק ו ו). כִּי יַאֲרִיךְ הַכָּתוּב וְיַזְכִּיר בָּהֶם טֻמְאוֹת רַבּוֹת, לִרְמֹז שֶׁיְּטַמְּאוּ כֻּלָּם וּמִקְצָתָם, בְּמִיתַת כָּל הַגּוּף וּבְמִיתַת הָאֵבֶר מִמֶּנּוּ כְּשֶׁיִּתָּלֵשׁ מִן הַגּוּף הַחַי:
AND THEIR CARCASSES YE SHALL NOT TOUCH. This is not a prohibition [saying that] we are not to touch these carcasses [of the animals that we are forbidden to eat]. Rather, Scripture states, and their carcasses ye shall not touch, for they are unclean to you, meaning to say, “you cannot touch them without becoming unclean.” The meaning thereof is to state that all those who touch them should be aware that they have become unclean and should therefore be careful not to enter the Sanctuary nor [to eat] of the hallowed offerings. Perhaps the meaning of the interpretation which our Rabbis have said: “And their carcasses ye shall not touch — on a festival” is to say that “you should not touch them at a time when you want to be clean, for they are unclean [and by touching them you will also become unclean] and you will not be able to go up to the Sanctuary on the festival.” But the [mere] act of touching them is not forbidden by means of a negative commandment, for he who touches carrion [even] on a festival does not incur whipping [by law of the Torah]. Thus that which the Rabbis have said: “One is dutybound to purify oneself on a festival,” is a commandment of Rabbinic authority, there being according to Scriptural law neither a positive nor a negative commandment, concerning the touching of carrion, except that of going up to the Sanctuary. Or it may be that the interpretation, “And their carcasses ye shall not touch — on a festival,” is a Scriptural text used as a support for the Rabbinical enactment, like many other laws of the Sages taught there in the Torath Kohanim, which use Biblical texts as a “support.” It is also taught there: “Other Rabbis say: One might think that if a person touches a carcass [he violates a negative commandment and] is liable to whipping? Scripture therefore says, By these ye shall become unclean. From this one might think that if a person sees a carcass he must go and render himself unclean by [touching] it? Scripture therefore says, and their carcasses ye shall not touch. How are we to reconcile these two verses? We must conclude that [touching a carcass] is optional” [i.e., neither obligatory, nor forbidden]. This is the main principle of the Scriptural law. AND BY THESE YE SHALL BECOME UNCLEAN. “By these which are to be mentioned further on in the section, ye shall become unclean. Here Scripture teaches you that the carcass of an animal unfit for food conveys impurity, and in the subject at the end of the section it explains [the law] concerning the carcass of an animal fit for food.” This is Rashi’s language. But if so, [the question arises], why did Scripture divide them and why did it treat them singly, when it should rather have said [in one general statement], “whosoever touches the carcass of any animal shall be unclean until the evening, and whosoever carries any of its carcass shall wash his clothes and be unclean until the evening?” The correct interpretation is that here Scripture mentioned the carcass of them without qualification and did not mention “death” in connection with them, thus teaching that [the law of] ritual slaughtering [required to render animals fit for food] does not apply to them [the unclean animals mentioned here], and whoever touches them when they are no longer alive [whether they died by themselves or even if they were ritually slaughtered], becomes impure. But further on it states, And if any beast, of which ye may eat, die, thus teaching that if it [an animal fit for food] was ritually slaughtered, it does not convey impurity [to a person who touches it]. Now the meaning of the section in mentioning [here]: And by these ye shall become unclean, is to state that all things referred to above — namely, fishes, fowls, and grasshoppers — do not have this [law of] impurity, but only those which He is about to mention further on, these being Every beast … which is not cloven-footed, nor cheweth the cud. It is with reference to these that He states, they are unclean to you; every one that toucheth them shall be unclean with the uncleanness mentioned [in the preceding Verses 24-25: whosoever toucheth the carcass of them shall be unclean until the even. And whosoever beareth aught of the carcass of them shall wash his clothes, and be unclean until the even]. Then He continues by stating that any beast which walks upon its paws shall also convey impurity until the evening to a person who touches its carcass, and that a person who carries it shall, in addition, wash his clothes. Similarly, And these are they which are unclean unto you among the swarming things means among those which are to be mentioned further on. Rabbi Abraham ibn Ezra erred here. Now above, in stating the prohibition of eating [an animal prohibited as food], Scripture mentioned those animals which are not cloven-footed and do not chew the cud, but it did not mention [the law] of beasts that walk upon their paws. Perhaps it is because it is not customary to eat them [on account of the danger involved in catching them] that He did not single them out, but left them [to be] included in the general principle which He had stated, that we should eat only the animal that parts the hoof and is cloven-footed and chews the cud, and not others, and chayah (beast) is included in the term beheimah (animal) as it is said, These are ‘ha’beheimah’ (the animals) which ye may eat … the hart, and the gazelle, and the roebuck. Our Rabbis in the Torath Kohanim have interpretations on this whole section. [Thus they explain the expression], Every beast [which parteth the hoof, but is not cloven-footed …] is unclean to you, to include a limb cut off from a living animal [in the law of conveying impurity]. And whatsoever goeth upon its paws, to include a limb cut off from a dead animal [in the law of conveying impurity]. For Scripture speaks at length and mentions many expressions of impurity in order to allude [to the law] that they convey impurity in whole or in part, either through the death of the whole body or through the death of one of its limbs, as when it was cut off from a living body.