The dead included two infants who drowned and a man who was electrocuted after the floods began late Tuesday, said Adnan Purichta Ichsann, the chief of Gowa district in South Sulawesi.
Rescuers were still evacuating residents to shelters at a government office and mosques, Ichsann said.
Staff at the Bili Bili dam, a rock-fill embankment dam, didn't have time to provide advance warning of the water release, he said.
"Torrential rain caused a dam to be overwhelmed by water, forcing us to open it to prevent a greater danger. This is what caused flooding in some areas," Ichsann said.
Deadly landslides and floods are a frequent occurrence during seasonal rains in Indonesia. A landslide in Sukabumi on the main island of Java earlier this month killed 32 people.
Ichsann said the death toll could rise as areas hit by landslides are waiting for heavy earthmoving equipment to join the search effort.
Several bridges were damaged by the flooding and power has been cut to the district.