There is a bit of stuff under the covers to more easily support fluid textures on the ocean. In particular one can use a 3D fluid texture with the "is2d" flag enabled. This avoids requiring a 3D placement node: the fluid is its own placement node. Also for handling the bump map rendering an ocean shader requires that one map the wave height offset with a 3D texture. 2D textures would displace the ocean but not affect the normal which would look bad. Also the ocean preview plane is designed to show the 3D fluid texture maps. I don't think the 2d fluid texture mapped to foam will show up. Also depending on the repeats it may not exactly match, so it is best to stick with the the 3D fluid textures.
For the 3D fluid texture the repeat or "wrap" of the texture outside the fluid container is controlled by enabling or disabling the edgeDropoff.
One can use other setups, but with the ocean shader it may be best to stick with the way the fluid texturing is setup by the "create wake" menu. (just don't set edgeDropoff to NONE unless you want the fluid texture to repeat across the entire ocean)
Duncan