Stories like the tale of the bamboo cutter that are about extraterrestrial beings who visit earth and either return to their place of origin or not. They can also be about people from earth visiting the moon or other planets (such as Lucian's True Story) and either returning or not returning to earth. Are there any?
It doesn't survive, but there seems to have been at least one earlier work about space travel: Antonius Diogenes's Wonders Beyond Thulë. This book, which was apparently presented with a straight face (unlike Lucian's satire), involved a character going past the edge of the earth and visiting both the Sun and the Moon.
Unfortunately, the work itself is lost; we only have fragments and a short summary now. But it seems fairly clear that Lucian's trip to the Moon and the war between the Lunars and the Solars was parodying Diogenes's definitely accurate stories.
There are many example of myth/folklore about people for "space/another planet" coming to earth. Examples: Nordic, Hoppi, Aztec, Buddhism, Judaism, sumerian, Egyptian, american Indians, primitive african cultures, etc, etc A simple google search will produce many. This question is way too broad for a good answer
In Australian Aboriginal myths there's the ancient cave art called the "Wandjinas". Wandjinas There are many interpretaions of the people in this art. One is that the Wandjinas were aliens from other planets who visited the Aborigines. A dissussion of this is at: Wandjinas Claims
This is one of these situaltions where I have specialist knowledge that most peopel and mods don't have. The next thing is going to be "close this thread because I don't provide a nice, juicy smoking gun quote from an Aboriginal person saying yes my ancestors saw UFO'S."
Sadly the world is more complex that that. A very simplified primer on Australian Aboriginal research and its problems.  The Aboriginal people of Australia were totally oral in their passed down traditions. They never had an alphabet or writing; thye passed down myths by art or spoken stories. So there is no "book" to be found like the Christian bible.  To this day Aboriginal people do not reveal the secrets of their past and culture to anyone outside of their Aboriginal tribe. That includes even anthropology researchers that they have trust in.  The Aboriginal stories are extremely complex. For instance they gave names to the constellations like many societies. But they went further. They gave names to the parts of the sky that had NO stars: the blank parts. They considered them unlucky.
I thought long and hard about whether I should post this at all. It does enter into a real minefield for those 3 reasons.