I wouldn't say 100%. Fish have extremely elevated output of ammonia after eating. Estimates I've seen are that 60% of this increase is directly from food. But even starved fish produce ammonia. Studies show that barring stress, starved fish will produced a low for continuous amount of ammonia.
Imo, this is likely internal metabolism. Fish are composed of proteins and when their cells are damaged or die, that would lead to a release of ammonia. Stress, unusually activity from swimming leads to increases in this level of release.
So, food protein is the primary source of the "surplus" ammonia. Studies I've seen claimed 60-80% was directly from food recently consumed.
Ultimately, I would suggest 100% is from food, because the muscle fibers (tissue) in the fish is a direct result of food. Fish can't generate their tissues from water and air.