"Life is but a dream." I think what it says about reality is that nothing is real (or everything that is experienced is real) for humans and that reality is a realtive term. Humans never experience true reality, the reality is always altered by the brain. If the reality is what we experience, then your dream was real, for you, because you experinced it as if it would be real, the same thing was happening in your brain as if it would be awake, with an exception of the fact that it didn't get any physical input, and it wasn't sending any physical outputs. A program doesn't tell a difference between an input received from a sensor, or an input written in the part where it takes the values from the sensor. A dream can be considered as if the values are written by your brain, instead of being received by sensors.
There is a theory saying that a dream happends, when your soul is in a different and undone pararell reality. What I mean by that, is reality that doesn't exist physically, that is one of infinitly many possible realities, that goes pararell to our reality. Imagine you have two choices, A and B, you chose B, then there's a pararell undone reality where you chose A. For me it's very hard to explain this, you can read about this theory in a book by Vadim Zeland (who invented the theory), 'Reality Transurfing', I don't remember which tom (because the book has a few toms).