yoron said:
To my eyes the potential energy gained for the ball is in the earth(gravity)/ball system, not in the ball itself.
This is correct. More precisely, to actually measure the gain in energy (or "mass"), you have to look at the system including both the Earth and the ball; just looking at either one in isolation will *not* show any increased energy (or "mass").
For example, suppose I measure the mass of the ball by taking a very small object and putting it in orbit about the ball, measuring the orbital parameters, and applying Kepler's Third Law. Let's suppose that I can find a suitable test object for doing this, and that I can find an orbital radius for the object around the ball such that the effect of any other gravitating body (such as the Earth) on the test object's orbit about the ball is negligible. (For a real ball anywhere near the real Earth, these conditions probably can't be realized; but we're doing a thought experiment here, and in principle there will be *some* conditions that meet these requirements.)
Given the specifications above, the "mass" of the ball, as measured by the orbital parameters of the test object, will be the same regardless of whether the ball is 1 foot above the Earth's surface or 1000 miles above it. The "potential energy" of the ball has no effect on this measurement.
However: now consider a different measurement. Suppose I put a test object in orbit about the Earth-ball *system*; in other words, I put it in orbit far enough away from the Earth and the ball that the orbital parameters are determined by the combined properties of the system as a whole; any effects of the Earth alone, or the ball alone, are negligible. Then I measure the "mass" of the Earth-ball system the same way as I did for the ball alone: I measure the test object's orbital parameters and apply Kepler's Third Law.
If I do this, I will find that the "mass" of the Earth-ball system is *larger* when I lift the ball to 1000 miles above the Earth, than it was when the ball was only 1 foot above the Earth. Here the "potential energy" of the ball *does* affect the measurement; but as yoron says, that means the potential energy is not really a property of the ball alone, but of the Earth-ball system.
However, there is yet *another* wrinkle to this. The energy used to lift the ball from 1 foot to 1000 miles has to come from somewhere. Where did it come from? To really "balance the accounts" properly, we have to take this extra energy into account; and for the observed "mass" of the Earth-ball system to increase as I just said, the energy that lifts the ball has to come from *outside* the system.
Suppose, for example, that I just throw the ball 1000 miles up. (I have *very* strong arms.

) Does the "mass" of the Earth-ball system change? *No*; it does not. The energy I imparted to the ball came from me, and I am part of the Earth-ball system; so the energy stored in me counts towards the total mass of the Earth-ball system. In throwing the ball, I am not increasing that total mass; I am simply transferring some energy from me to the ball.
But suppose that a small rocket engine, with fuel tank attached, is dropped to Earth from very far away. We attach the engine to the ball and fire it, and it turns out to have just enough energy to lift the ball from 1 foot to 1000 miles above the Earth. Then the total mass of the Earth-ball system will increase--but it will increase as soon as the rocket engine is received, *before* we lift the ball. The firing of the rocket, like my throwing of the ball, does not change the total energy of the system; it simply transfers energy from the rocket to the ball.
Similar remarks apply to any system where "potential energy" can be stored and released; yes, the total "mass" of the system can increase when potential energy is stored (such as when a spring is compressed), but only if the energy that is being stored comes from outside the system. (If I compress the spring by muscular effort, the spring's mass increases because I am not counted as part of the spring "system". But if the spring is part of a larger system, such as a whole machine, and the spring is compressed by energy transferred from some other part of the system, the compressing of the spring does not change the mass of the total system.)
I know this was a bit long-winded, but the issue is complex and deserves detailed discussion.