How big of a tank do you keep your frog in? Depending on the species of goldfish (fancy goldfish are smaller) a 20 gallon long with a really good filter and weekly 50% water changes would be needed to keep both these animals together, at a minimum.

Here's basically the worst case scenario assuming the tank is large enough to sustain both species:
1. The frog will eat the goldfish. Do not underestimate Xenopus, they are capable of eating fish you would otherwise assume are safe.
2. The frog will attempt eat the goldfish, not be able to swallow it whole and both species will die as the frog suffocates the fish and the frog chokes on it. (this can happen)
3. The frog will maim the goldfish (especially fancy goldfish) by latching on to a fin and raking it with it's claws. African clawed frogs are 'upper' eaters, you have to assume they will TRY to eat it. If they cannot fit in the mouth whole, they will bite and use the claws. I've seen my frogs tear large nightcrawlers apart like this and those claws are serious business.
4. The fish introduces a parasite/disease and infects the frog (quarantine this animal first in a hospital tank) .

I applaud your desire to save this fish, just be careful here as some scenarios may doom both animals. It is possible for them to co-exist, they can both tolerate the same water parameters. You realistically would need a 30 gallon or higher though to properly keep both and you have to hope the frog isn't overly predatory towards the fish.

My own personal bias is this, I think goldfish are really fish that belong in ponds not aquariums. They tend to grow very large and are very messy animals. They like colder water and probably are happier in an outdoor pond than a fish tank. I don't recommend housing these animals together, it would be better to establish the goldfish it's own tank or re-home it. Again I must reiterate that I am not a huge goldfish person, I find a lot of people get these fish and keep them in insanely small tanks (as you have witnessed first hand). More often than not they die prematurely due to some illness or succumbing to ammonia poisoning or what have you.

Conventional wisdom says to house these guys separately. I cannot say 100% it cannot or will not work but I personally would not put them in the same tank.