A dream? A thought? An actual experience? How do you tell them apart if they are a recollection in your memory? If enough of your senses are recruited in the description/generation of that memory, there’s really no way to actually differentiate them except if you additionally stored metadata to identify the memory with that attribute. They get stored (and at some point, discarded) in the same way. Granted remembering dreams requires most people active participation the next day to usually form a long term memory.
I recall having a dream, the event was “normal” enough (a train ride – something feasible to associate with a vacation) that it could have conceivably happened. In the dream I took a photograph of the event on my phone. That photo doesn’t exist on my phone and so I know it was just a dream. But, had I not done that in the dream but had still bothered to think about the dream in the morning, forming a long term memory, would I be able to tell it apart as a dream and not a “real” experience? Afterall, every memory is an amalgam of the results of your senses with potentially an associated timeline. Beyond that, your brain doesn’t know the difference. The metadata associated with the storage in your brain helps you discern the difference when you recall the memory. So, what’s real and what’s just a figment?