I'm currently trying to flatten waves of the ocean simulator on a beach area using a lattice. But sometimes the end of the waves mesh becomes visible. When the influence of the lattice is increased too much it pulls the whole ocean to the beach.
I just tried out using the shrinkwrap modifier and it worked. Set the mode to "project". You might have to make a separate mesh that the ocean shrinkwraps to that doesn't include those things that look like rocks and stuff.
Beyond that, you might also want to look into using fluid simulation or animating little waves or something similar if this isn't what you're after.