Could I replace a hub on a wheel? I have a freewheel and I keep bending the axle, however the rim, spokes and tire are all fine, does anyone think it would be possible to unscrew the spokes, buy a new hub that has a freehub, install that with maybe new spokes and my previous rim? (And also buy a cassette) because I don't see the point in buying a whole new wheel just for the hub.
Simple answer: yes, but it’s not worth doing. 

Cost of hub, spokes, nipples and having wheel rebuilt will exceed the cost of a new wheel. Even if you re-use the spokes a new wheel will still be cheaper. 

Wheel building requires special equipment, expertise and time to do correctly.