Goldfish do not need an air pump for effective breathing. Oxygen is dissolved by disturbances at the surface of a tank, and that movement is adequately produced by the tank's filter.
There are three instances when an air pump improves water oxygen quality. Use a pump if the tank filter is not large enough to ruffle the surface water. A pump is essential in a tank that is tall and deep, because the water surface area is small and limits water oxygenation. A tank with a warm water temperature requires a pump, because warm water generates less oxygen than cool water.