Painting by Salvador Dali, taken from this site
The sentence: life is my dream might be derived from the sentence: there is the divine spark in human beings.
My divine spark could be “perceived” only from within, the divine spark in other people could be “perceived” only from outside. This spark is “something” most real in me, thus I might claim: I am the divine spark experiencing an illusion of being a person, metaphorically: I dream I am a person. Other people (and objects) are as real as they are my true Self.
“I” does not bear a name, so other people could also agree with this reasoning.