At the moment when Rey is captured by Kylo Ren, she is holding the blaster given to her by Han Solo. When Kylo freezes her, her arm kind of gets forced down, leaving the weapon pointed towards the ground and her grip on it apparently unaffected. At this point, she's still got it and it's not going anywhere. We don't see what happens to it when Kylo uses the Force to knock her unconscious.
The next we see of her right hand is when Kylo is carrying Rey on board his shuttle. By now, she is definitely no longer holding the blaster. So she dropped it somewhere (or it was taken from her hand) between that spot in the woods and here. She definitely does not have the blaster at any point while she's on Starkiller Base, and the blaster remains on Takodana. (I'm of the opinion that she drops it as soon as Kylo picks her up. Curiously though, her hand is still in a fist, so I'm not sure.)
Later in the movie, as she's on her way to meet Luke Skywalker, she once again has the blaster.
Staying in-universe, the weapon must have been recovered by someone who later was able to return it to Rey before the end of the film. However, it doesn't seem like it could have been any Resistance people who did it. Right after the First Order departs, General Organa's transport lands, drawing the attention of both Han Solo and Finn, and nobody on the transport would even have known about Rey. It seems extremely unlikely to me that any of them would even have thought to go looking for her blaster, as there are far more important things to deal with.