Our teacher, the Rema, further wrote: And some say that it is permitted to stick parchment onto it from the outside as long as it is permitted to sew them, and to stick the tear together by this means. And similarly, if something is missing, one writes on the stuck parchment. And such is the custom. Thus far his words. And he was brief, as is his way. And in truth, there is a very great dispute regarding this matter: some forbid entirely placing a patch in a sefer Torah and writing on the patch, and some permit it. And even those who forbid—this is when a portion of a sheet is missing, and the patch completes it and he writes upon it. But regarding a mere tear, just as it is permitted to sew it—so too it is permitted to place a patch from the outside so that they stick to one another. And so it is explicitly stated in Masechet Soferim (end of chapter two): A law given to Moses at Sinai: a sefer Torah that was torn—one patches a patch upon it from the outside. See there. However, regarding writing on the patch, there is a dispute there prior to this, and this is its wording: One may not stick with glue, and one may not write upon a patch, etc. Rabbi Shimon ben Elazar said in the name of Rabbi Meir: One may stick with glue, and one may write upon a patch, etc. Thus far its wording. And afterwards it wrote that "if it was torn, one patches, etc." And it seems to me that this is the explanation: One may not stick the tear with glue, meaning: with glue alone without a patch it is forbidden, lest from use the glue will be ruined and it will tear. Rather, one should place a patch over the place of the tear from the outside, and stick it with glue as it concludes later. And then it says: and one may not write on a patch, meaning: regarding a tear we permitted a patch, but regarding a hole or a deficiency where we would need to write on the patch—it is forbidden. And Rabbi Shimon ben Elazar in the name of Rabbi Meir permits both things. And those who forbid hold that the halacha is like the first Tanna, and those who permit hold that the halacha is like Rabbi Meir. And perhaps because Rabbi Meir was a scribe, and served in this capacity under Rabbi Yehoshua and Rabbi Akiva, as is found in the first chapter of Eruvin, see there. Furthermore: in the Yerushalmi, first chapter of Megillah, it says: and one patches with a patch and sticks with glue. But there are those who explained it regarding tefillin, for the entire subject there is regarding tefillin, see there. And this explanation of mine is clarified, in my humble opinion, from the wording of the Rosh in the laws of sefer Torah (siman 14).
עוד כתב רבינו הרמ"א: ויש אומרים דמותר לדבק עליו קלף מבחוץ כל זמן שמותר לתפרם, ולדבק הקריעה על ידי כך. וכן אם נחסר דבר כותבין על הקלף הדבוק. וכן נהגו. עד כאן לשונו. וקיצר כדרכו. ובאמת יש בעניין זה מחלוקת גדולה מאוד: יש אוסרים לגמרי להניח מטלית בספר תורה ולכתוב על המטלית, ויש מתירים. ואפילו האוסרים – זהו כשחסרה מקצת מיריעה, והמטלית משלימה וכותב עליה. אבל בקרע בעלמא, כמו שמותר לתופרה – כן מותר להניח מטלית מבחוץ כדי שידבקו זו לזו. וכן מפורש במסכת סופרים (סוף פרק שני): הלכה למשה מסיני: ספר תורה שנקרע – מטלה עליו מטלית מבחוץ. עיין שם. אמנם לכתוב על המטלית יש שם מקודם זה פלוגתא, וזה לשונו: אין דובקין בדבק, ואין כותבין על גבי מטלית וכו' אמר רבי שמעון בן אלעזר משום רבי מאיר: דובקין בדבק, וכותבין על גבי מטלית וכו' עד כאן לשונו. ואחר כך כתב הך "דנקרע שטולה וכו'". ונראה לי דהכי פירושו: אין דובקין בדבק את הקרע, כלומר: בדבק בלבד בלא מטלית אסור, שמא מתוך התשמיש יתקלקל הדבק ויתקרע. אלא יניח מטלית על מקום הקרע מבחוץ, וידבקנו בדבק כדמסיק לקמן. והדר קאמר: ואין כותבין במטלית, כלומר: בקרע התרנו מטלית, אבל בנקוב וחסור ונצטרך לכתוב על המטלית – אסור. ורבי שמעון בן אלעזר משום רבי מאיר מתיר בשני הדברים. והאוסרים סבירה להו דהלכה כתנא קמא, והמתירים סבירא להו דהלכה כרבי מאיר. ואולי משום דרבי מאיר היה סופר, ושימש בזה אצל רבי יהושע ורבי עקיבא, כדאיתא פרק קמא דעירובין עיין שם. ועוד: דבירושלמי פרק קמא דמגילה אומר: וטולין במטלית ודובקין בדבק. אך יש שפירשוה על תפילין, דכל עניינא דשם הוא בתפילין, עיין שם. ופירושי זה מתבאר לעניות דעתי מלשון הרא"ש בהלכות ספר תורה (סימן י"ד).