First you need to find the reason why there is foam on the pond surface. There are many reasons for the foam to appear on your pond. One proposed solution is to keep the pond aerated.
I often get foam on pond surface when adding bacteria such as now when I had to rebalance the water. I have seen it after using some algae fixers as well. I haven't had a problem with the foam from that source. It normally adjusts to clear surface in a few days.However, I am interested in your comments as I don't want to be doing anything that may cause a problem to my 10 plus year old koi.
I believe that you posted this question before.
It maybe needs a flush of fresher water. L
Start by getting some water test strips that detect the presence of phosphates, ammonia and nitrites. If you get a positive/high reading for phosphates, then the foam is coming from the decaying organic matter in the pond (which can be from vegetation, fish waste, or too much food). If that's the case, you'll need to move the fish to another area and clean out the pond. If ammonia levels are high, they can be dangerous to the fish and you'll need to install a good filtration system to the pond (in natural ponds, ammonia levels are kept in check, and so is the foam). Nitrites are formed through bacteria which over time can kill the fish. You'll need a good filtration system for that as well, as any levels can be harmful (especially to more sensitive species like Koi). The foam itself is merely a good indicator that the water quality is suffering, so figuring out the cause is the most important step in saving your fish. :-)