MSF said its chartered rescue ship, the Bourbon Argos, picked up 107 people aboard the boat 26 nautical miles off Libya on Tuesday.
Its crew initially counted 11 corpses on the dinghy's floor, which was flooded with a mixture of fuel and seawater.
The Bourbon Argos was then called away to another rescue operation nearby, saving 139 people aboard another vessel.
The crew returned to the first vessel and found on closer examination that in fact 29 people had died, probably from suffocation, burns or drowning.
The bodies were retrieved from the toxic mixture over a period of hours, with the help of a team from the German NGO Sea-Watch.
"The mixture of water and fuel was so foul that we could not stay on the boat for long periods. It was horrible," MSF project leader Michele Telaro said in a statement.More photos below...