Please note: the following are my metaphysical views and do not represent an endorsed view or position by the group this site serves. The members of our group hold many diverse metaphysical views and we respect them all.
To assess what dreams are and how they relate to life and the afterlife, we have to begin at the foundation: what "reality" is and how it works, and what it means for something to be "real" vs "not real."
In my view, existence is ontologically idealist in nature. This has been conclusively demonstrated by over one hundred years of quantum physics experimentation, including research that won the 2022 Nobel Prize in physics. "Ontological Idealism" means that all of our experiences are generated by, made of, and occur in mind/consciousness. The consistent, solid, "material" world we all experience is occurring the same way as when such an experience occurs in a dream. It is generated by, made up of, and occurs in mind/consciousness.
In other words, when you go to work, get hungry and cook some food, use the bathroom, take a shower and go to bed, you are essentially in a dream and yes, other people are sharing much of the same "dream world" with you. This is what reality is and how it works.
Under idealism, everything you can imagine or dream is existentially real. A "not real" thing would technically be something that is not possible, like a square circle, which cannot even be imagined. For this reason, the question "is it real" is not applicable in the old way; "real" has a different meaning. Under idealism, "real" would refer to a set of experiential qualities used to identify that experience's location in relationship to your current, overall, dominant psychological structure.
Your psychological structure includes both conscious thoughts and the subconscious, but it is the subconscious that is key, because it is the set of deep beliefs and concepts about ourselves, others, life and existence that we usually don't even know we have, but which generate most of our thoughts, reactions and emotional responses. Your dominant psychological structure is, essentially, your self-identity at any given time, and it always generates/resides in a contextual environment that supports and gives meaning to that identity.
In normal dreams, we are usually, mostly disassociated from our current identity. We don't remember who we are, and while we are in the dream we have motivations and a perspective that is dream-centric. If we wake up and remember our dream, there may be qualities and events in the dream, or seem unrealistic compared to our life here and don't make sense to our psychology here, but seemed "normal" while in the dream. In other words, while in the dream we aren't thinking, "how did I get here? What the heck is going on? Why did that house just change into a mountain?"
As soon as we wake up, our psychological structure here may re-write much of the dream, or even obliterate it entirely from our memory. Our subconscious is full of programming we have picked up over the course of our lives that is constantly interpreting, processing and editing incoming information into patterns that our current psychology can deal with. Because there is infinite information available in an idealist world, our psychological structure is editing out an immense amount of information so that we can have a comprehensible, orderly, continuous experience. You might say that our psychological identity sets a kind of boundary that only allows in certain streams of information and then edits and organizes that information into useful experiences that serves the dominant identity structure.
Within our subconscious are a lot of things, like that which generates our fears, insecurities and doubts. These and other mental programs can take us into experiential environments that express these fears, insecurities and doubts both in this world and when we visit other places in our dreams. Often, these subordinate aspects of our identity take us into these other locations as our consciousness here drifts or falls asleep and our identity structure shifts from what keeps us "here" to a different arrangement, often dominated by various elements in our subconscious mind, such as worries and concerns often expressed in our conscious thoughts and feelings. Remember, worries and concerns in our conscious mind are usually, if not always, generated by subconscious programming, and we can change our subconscious programming.
So, dreams are locations we visit that have a connection to various aspects of our psychological state, but they are also edited and rearranged into our "awake" psychological state when we wake. The people we meet in dreams are people, or versions of people, that actually exist somewhere; you might call these places "alternate realities," so to speak.
Generally speaking, the more solid, continuous, and "normal" a dream experience is, and the more conscious we are there - meaning, our "this world" consciousness, the more "real" it feels, and the more clearly we remember it, the closer that location is to our current psychological state, our current "reality." Our current dominant psychological state is a kind of "tuner," like an old analogue radio dial, that tunes in to a certain channel and tunes out all the other channels.
When our dead loved ones attempt to visit us in our dreams, they have to contend with our subconscious programs that can interfere with and disrupt the experience. This is actually also true when they try to come thru to us in our waking state. Penetrating our psychological boundaries and bypassing the natural editing and rearranging done by our subconscious programming can be a very difficult task.
Mediums like Suzanne Wilson have described what it takes to pull off a successful dream visitation that overcomes these issues. A psychological stage has to be set and this can require a lot of patience, waiting for the right opportunity and favorable psychological conditions to pull it off so it does not go awry due to strong subconscious influences on our part. We can actually help in this effort by doing what we can to create and maintain a good, positive and receptive psychological state for them to work with.
In an idealist existence, managing and directing our thoughts, and using subconscious programming techniques such as affirmations, writing our own internal narrative, meditation, visualization, memory revision, etc. are important tools in getting to our desired destinations and experiencing more of what we wish to experience. This also helps to acquire such experiences as astral projections and easier, better contact with the dead, and helps to put us in our desired afterlife situation when we eventually make that journey. It also helps direct our experiences in this life and in our dream states.