You drop sand or gravel blocks around the perimeter then remove water using sponges. A nether portal gives you quick access to a place to efficiently dry the sponges. Then you build the oil rig.
When you’re done building, remove the sand/gravel and the ocean mostly just goes back in. You might need to help it with some of the interior spots to make sure it properly re-fills with water source blocks. That’s not hard to do but explaining the details is beyond the scope of this comment I think.