My guess is that you have a wood boat?
I'd do it in the water
. You may cause some leakage around the bolts if you break them off or extract them. If water leaks
around a broken bolt, just caulk around the bolt with cotten and a screw driver or some sort of tool. You may cause a leak if you drill new bolt holes but you'll be able to stop the leak with the new bolt.
Be careful driving bolts through the frames if they are severely rusted - you may split the frame before you get the bolt out. Best to cut the bolt off between floor frame and hull
frame and drill new bolt holes if you can. Use a sawsall to cut the bolts just don't cut into the plank!