The sequence is actually a "happy" memory for Summer about her and her imaginary unicorn fairy rainbow lamb best-friend "Tinkles".
As she flies around the fairy-land, one line in the song is "No little brothers" and Morty is shown trapped in a small cage.
The harshness of the joke is that in Summer's happy memory, Sleepy Gary is actually her dad and married to her mum; persisting the dark joke that Jerry is entirely hated and resented by his whole family and the world would be a better place if he never existed.
Even Jerry's own happy memory doesn't involve Beth or his children, it's just him and Sleepy Gary having a romantic tryst at sunset on a catamaran, hoping to see one of the filming locations for the "new" Star Wars movie.
So it's not that Sleepy Gary put himself in Summer's memory, it's that Summer's happy memory of "Tinkles" also is only a happy memory because Sleepy Gary is her dad. It's mildly embarrassing yes, but it's more like she was caught by her parents who can't see her imaginary friend -- the way most imaginary friends work is that no one else can see them. So it's not a bad memory, it's just a rational and happy one. And arguably as a teenager, such a mild and innocuous "embarrassment" might be considered peak-happiness, as opposed to the harsh realities of a suburban teen girl's plausible and countless actual embarrassments.