That's actually an interesting idea - set up a temporary lock/dam on either side of the ship to float it. If, instead of a boring dam made out of concrete or something "normal" we used a fleet of Chinooks then all the better!
I do believe this is probably one of the solutions that's being investigated but I also believe it's
1. Super expensive to construct an impromptu dam under water
2. Floating a listing ship can result in more severe listing if you're not careful (See, for instance, the fact that when a ship beaches itself while the tide is out it's initially bad news - and when the tide starts to come back in it becomes significantly worse news.