The symptom you describe is the pawls inside the freewheel not moving freely enough to allow it to coast when it's supposed to.
Sometimes they do this when they're broken or out of place, but in the scenario you describe they probably just got a little corroded and/or were under-lubricated in the first place - likely all of the above.
The simple thing you can try that usually works is to get something that will break up the corrosion and/or add lubrication worked into this gap indicated here:

You can do this by putting the bike on its side, drive side up, and wicking in your choice of fluid. There are more in-depth ways of doing this, like removing the freehweel completely so you can do the same on the other side, but it's often not necessary.
As for what to use, lots of things may be able to work - WD-40 or similar, Tri-flow, CLP, 3-in-1 oil, Liquid Wrench or other penetrating oils, etc. You're looking for anything that will wick in. If you have something like Tri-flow or another oil that does not have a solvent component, that's what I would start with, because even if say WD-40 worked, it's almost all solvent and you would want to add a lubricant afterward if it does get things moving again, which will make it work better longer and avoid a repeat of the problem. But, if WD or other similar do-everything spray product is what you've got, that's fine, just chase it with some chain oil after the solvent component has done its thing and evaporated.
The sound coming off the freewheel will be different than before, which is fine as long as it's consistent and no weird intermittent grinding or rumbling or the like. It sometimes happens that when freewheels are ridden in a half-working (gummed up, dry, and/or corroded) state, they can be damaged from partial engagement and not work right again even when the original problem is addressed.