There are 4 states of consciousness - waking, dreaming, dreamless and Turiya although some people do refer to 5th state called Turiyatita. According to Adi Shankara, dreams are created by Jiva.
Brihadaranyaka Upanishad IV.3.9 -
He himself destroying, he himself shaping dreams with his own splendour, with his own light.
There is a type of dream known as lucid dream. According to Wiki:
A lucid dream is a dream during which the dreamer is aware of dreaming. During lucid dreaming, the dreamer may be able to exert some degree of control over the dream characters, narrative, and environment.
This is the difference between normal dreams and lucid dreams, in normal dreams, dreamer has no control over environments and objects but in lucid dreaming, the dreamer decides what to do next!
Dreamer might want to go on a solar system trip or a visit to Betelgeuse which is 700 light years away. Dreamer can fly like a free bird or dive in the ocean like Godzilla! There are a lot of experts in this field who have years of experience in lucid dreaming and according to research, most people experience atleast 1 lucid dream in their life.
But do scriptures contain anything about it? As far as I know, Upanishads talk about dreaming state but not sub type of it.