You can buy a wheel online, but you need to know some details. obviously the rim/tire size, which can be read from the tire. Than the hub axle width, which you can measure directly, locknut fact to locknut face. Or you can measure the inside width of the rear dropouts.
Then there's the number of speeds on the freewheel.
So buying a wheel is easy, though the rim isn't likely to be an exact cosmetic match. However, you still need a special tool -- a freewheel remover which will cost $10-15. So you might end up having an easier time going through a local shop, which can remove and transfer the freewheel for you.
If you're thinking of a new bike anyway, you might put up with this wheel as long as it lasts or until you replace the bike.
While some here disagree, I believe (based on experience) that the wheel can be brought to a point of riding decently (nowhere close to perfect) so you can ride it with no or at least less noticeable thumping. The place to have that done at a reasonable cost would be a bike co-op, if there's one near you, or at an old school "dirty fingernails" bike shop. Explain that you don't want or expect a miracle, just get it decent so the thumping isn't this bad.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.