Your waterfall should function to direct the water into the pond independent of any rocks. Your general shape needs to be concave - as if it was dug out of the earth, which is exactly what a waterfall will do, right? (Well, unless it's a giant sheet fall coming over the edge of a cliff... but that's a whole other thing!) Your liner edges should always be the highest point all along your waterfall. Bring it up, fold it over, and backfill it to keep it upright. The number one way people lose water from a waterfall is along an edge that's too low.
Waterfall foam should only be used to direct water over rocks rather than behind. Essentially you fill any gaps behind rocks where water could find it's way on the way down the falls and make it go over. It will not keep water from leaving the pond, if you are trying to use it as a barrier. Let me amend that - it may APPEAR to keep water from leaving your pond, but it's not waterproof. Water is seeping through it. It's also not necessarily permanent - we have "re-foam the waterfall" on our fall list of garden chores. Because the foam is generally exposed to the elements, over time it will start to degrade and break down and need to be re-done.