Contains Melody of Memory spoilers.
Kairi unknowingly has the power of waking, which she acquired when fighting Xehanort at the end of melody of memory. (It's not unlike how Riku and Sora got their power of waking while dreaming.)
Yeah, It could be Sora that used it (likely canon), but I doubt it since he used it so extensively before and was ejected into Quadratum (I think I spelled that right).
The other alternative, is that it was just a dream. But in Kingdom hearts, dreams may as well be reality. Why was Sora there if not through the power of waking? I think Kairi knew she could not defeat xehanort, and called upon Sora using the power of waking.