Blowing up dams--even if the dam is a military object--is a specifically enumerated war crime under the Geneva Conventions, if attacking that object would cause the release of dangerous forces (specifically: flooding) that attacks or could cause severe losses to the civilian population
It is a war crime specified in Additional Protocol I to the Geneva Conventions.
Putin withdrew Russia from the ratification of Additional Protocol I in 2019.