I thought Aqua took LoD from the physical plane and transformed it to the in-between CO. How would the fight have taken place in the dream realm? I thought the only sleeping worlds were awakened by Sora. Or are you just saying they might have just dreamt the fight took place? Anything that remotely ties into the rules of DDD leaves me confused.
Err, no, LoD always is/was an in-between world, just like Twilight Town as well. Aqua didn't change realms but only the layout of the world. In-Between worlds all have special properties and one of them is that they can exist in both realms (in-between and sleeping) at once, which is shown in DDD with Traverse Town, Mysterious Tower and The World that Never was, all in-between worlds just like LoD/CO and Twilight Town.
As far as we know, the Realm of Sleep always existed and why would the few worlds that Sora went to the only ones that are sleeping?
Nomura in fact points out the exact opposite:
Famitsu said:
— The setup certainly was different and trickier than before. In their travels this time they were essentially supposed to go to the worlds shut by sleep, but in the end, an entirely different world sets the stage.
Nomura: There are other worlds shut by sleep, from the start which ones they would go to was not decided. Even Yen Sid didn’t know which worlds they would go to. Amidst that, they were guided by two members of Organization XIII to the World That Never Was.
The condition (in order to gain the power to awaken sleeping hearts) was to unlock seven sleeping Keyholes, which seven that would be was in the long run not really important.
---
Since the world can exist in both realms, it might be a more in-canon explanation for the fight with YX in BBS even for Aqua.