Yes, it is absolutely possible. There are two main approaches to simulate buoyancy. GPU readback from the Niagara System and running the simulation on the CPU as described by DeathreyCG in a previous comment.
Underwater effects would normally be done using a separate material in a Post Process Volume. This material could use the same render targets as the ocean material to access the surface displacement to determine whether the camera is underwater or not.