I'd recommend going to a local cobbler and asking. They'll likely give you some good advice for free and estimate on the work. Depending on how the sole is attached to the shoe, they may or may not be able to replace it for you. I had dress shoes re-soled and it cost $10 or $20, but they were not rubber soled. They will likely replace it with a generic sole, so it would not have the same exact look as the original.
I suspect you could find a way to patch it yourself, but you'd likely feel the patch if it's under the foot. They make shoe glue to re-seal the bond between the sole and the upper, but if the sole itself is wearing away your options may be limited to just replacing the whole sole.