If the hub has sealed bearings of a standard size (most are), they are cheap to replace and doing so will restore the hub to "as new" condition. You do need a couple of special tools which most bike shops should own.
With traditional cup and cone hubs, it can be more expensive. If the hub is already rough, just replacing the bearing balls won't help much. On Shimano hubs, the hub is scrap if the cups are pitted. On Campag hubs, cups are replaceable but it's barely economic.