That only works if you throw away half the movie. Ferris is real to his sister, his parents, and the school administration.
Now, what if Cameron isn't real?
Now, what if Cameron isn't real?
If Cameron, too, isn't real, there is no movie: a dream requires a dreamer. The whole movie, i.e. Cameron and his dream is, of course, John Hughes's dream, and then the audience's.
If we shadows have offended,
Think but this, and all is mended—
That you have but slumbered here
While these visions did appear.