The story starts with a little girl in bed at night being told a story by her mother. The mother tells her it is possible to leave your body and fly. Somehow the girl pops out of her body and flies around. But she meets some other entity flying around, that turns out to be evil. It tricks her and pops into her body. The girl is left with nowhere else to go and has to pop into the body of her doll.
This was a short story published in a magazine in the 80s/90s. The author was female. The reason I came across it in the first place is that someone else on the internet posted a message describing the story and looking for the title of it. Even though it was obscure, someone managed to identify it for them and it was available to read online via a link (either posted on a website or through Google books)
The story is a creepy fantasy story for adults, but it is told in a style similar to kids stories and it is told from the POV of the girl.