"Dreaming of Musashino" by Chôbunsai Eishi (鳥文斎 栄之, 1756-1829).
A girl falls asleep leaning on a stack of volumes of the Tales of Ise, and dreams of a famous scene from the story.
This was the first time I’d seen anything resembling a speech balloon or thought bubble in such an early work; I have since learned that this was not actually all that uncommon, i.e. that this work was hardly the first.
I especially like the twist in the bubble, something we don’t see in modern comics or manga, but which was relatively common in early modern works.