Fuel gages rarely go bad, nor do the senders. Check the fuse. If it gets a bad seat or corrosion on the contacts, it could cause this problem. So can any other connection in the wire to the sender in the tank, so check any connections, even the ones on the gage in the instrument panel.
The fuel sender and the pump are two different items. The pump has nothing to do with the gage being erratic. The fuel sender is in the gas tank and the tank usually has to be dropped to get to it, so, it is a chore, but like I said, it rarely goes bad. It can be replaced A shaky fuse or just a bad fuse seat is a likely cause. The tank sending unit is relatively easy to check if you can get to the wire that goes to the sending unit near the tank someplace. Just short the end of the wire to ground, that goes to the fuel gage and the gage should read full all the time. If it doesn't, there is something wrong besides the sending unit. Anyway, whether you can check these things or not, yes the fuel sending unit can be replaced.