This line is really a part of the poem. Think about how at the end of a cheesy movie someone will wake up and say "It was all a dream!" Well, that's what Coleridge does here, except he starts off like that. We know right away that the world we are stepping into is an alternate version of reality. Even though it contains some parts of the real world, it won't always look and feel the same.
"Ancestral voices prophesying war!" (line 30)
There isn't just one dream going on here either - there are all kinds of layers in this poem. Kubla (who might be a ghost) hears the voices of his ancestors in the river. It's a vivid image - you can almost hear the shouting and the clanking and the stomping of those Mongol hordes. These guys conquered all of Asia and some of Europe in just a few decades. They must have been terrifying. So we've already got a strange dream of Xanadu going on, and now there's another dream of the armies of Genghis Khan nested inside of it.
"In a vision once I saw" (line 38)
When did he have this vision? Is this the vision in the dream he was talking about? It seems like this must be yet another vision. The dulcimer-playing maiden appears in a strange way, and seems to belong to another story entirely. So we have dreams and visions and hallucinations all fighting for space in this poem. See why alternate versions of reality are such a big deal here?
"His flashing eyes, his floating hair!" (line 50)
This is the last and most intriguing vision. The speaker dreams he could sing this creature into existence. The dream is turning into a nightmare pretty quickly. It's hard to pin down exactly what we're seeing here. Is this some new vision of Kubla, now ready for war? This person or thing seems to be some kind of god, and whatever is happening with these eyes and this hair, we think it sounds like bad news. This is the part of the dream where you wake yourself up and go have some cookies and milk. Or, you write a poem about it, if you're Coleridge.