c. 1200, reufulliche, reufulike; from c. 1300 as rufully, reufulli; see rueful + -ly (2). The oldest sense, now obsolete, is "pitiably, lamentably." The meaning "mournfully, dolefully, in a sorrowful manner" is from c. 1300.
c. 1200, reuful, rewfulle, reowfule, "expressing suffering or sorrow; sad, dreadful" (of news, etc.), also in a now obsolete sense of "merciful, compassionate," from rue (n.2) + -ful. Related: Ruefulness (c. 1200 as "compassion, mercy;" 1580s as "dejection").
common adverbial suffix, forming from adjectives adverbs signifying "in a manner denoted by" the adjective, Middle English, from Old English -lice, from Proto-Germanic *-liko- (cognates: Old Frisian -like, Old Saxon -liko, Dutch -lijk, Old High German -licho, German -lich, Old Norse -liga, Gothic -leiko); see -ly (1). Cognate with lich, and identical with like (adj.).
Weekley notes as "curious" that Germanic uses a word essentially meaning "body" for the adverbial formation, while Romanic uses one meaning "mind" (as in French constamment from Latin constanti mente). The modern English form emerged in late Middle English, probably from influence of Old Norse -liga.
<a href="https://www.etymonline.com/word/ruefully">Etymology of ruefully by etymonline</a>
Harper, D. (n.d.). Etymology of ruefully. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/ruefully