(Genesis 38:27-28) "And it came to pass when she was in labor, that one put out a hand." Rav Huna said: The fetus put out its hand and drew it back; its mother becomes impure with the impurity of childbirth, as it is said, "And it came to pass when she was in labor, that one put out a hand." But did we not learn [in a Mishnah]: If a fetus put out its hand, its mother need not be concerned regarding anything [she does not yet incur the laws of birth]? As for incurring concern, she does incur concern; the days of [her ritual] purity we do not grant her until the greater part of [the child] has emerged. And she is not concerned by Torah law, but by rabbinic law she is concerned and the verse is a mere supporting allusion [asmakhta].
The Twin Who Put Out His Hand and the Laws of Purity
Yalkut Shimoni on Torah 145:12
(בראשית לח כז-כח) וַיְהִי בְלִדְתָּהּ וַיִּתֶּן יָד. אָמַר רַב הוּנָא, הוֹצִיא עֻבַּר יָדוֹ וְהֶחֱזִיר, אִמּוֹ טְמֵאָה לֵידָה, שֶׁנֶּאֱמַר וַיְהִי בְלִדְתָּהּ וַיִּתֶּן יָד וְהָא תְּנַן, הוֹצִיא עֻבַּר אֶת יָדוֹ אֵין אִמּוֹ חוֹשֶׁשֶׁת לְכָל דָּבָר, לָחוּשׁ חוֹשֶׁשֶׁת, יְמֵי טָהֳרָה לָא יַהֲבִינָן עַד דְּנָפִיק רֻבֵּיהּ. וְאֵינָהּ חוֹשֶׁשֶׁת מִדְּאוֹרַיְתָא, אֲבָל מִדְּרַבָּנָן חוֹשֶׁשֶׁת וְקָרָא אַסְמַכְתָּא בְּעָלְמָא.