It’s the past not the future, have some IQ man, that is what happened to her
That dream was not a memory, it was straight up just a nightmare. She literally says she knows about him from a portrait hanging on the orphanage, and not only that, but in the dream he says she had already survived the forest, meaning that would be in the future, since she is still lost in the forest.
And while yes, it could be that she was molested in the past, we don't really know that for sure so far, maybe that will come up later.
The part about her mixed memories causing the dream could also mean other things, such as her knowledge about adult stuff mixing with her understanding of how corrupt her current world is.
Screenshots of the dialogues: