That is not entirely true.
All that concrete it take to build a dam, consume massive amounts of power, most often in the form of oil or gas to make the heats needed to make the concrete, the single largest Co2 emitter here in Denmark is the Aalborg portland cement factory.
But the math in regard to how long a dam will have to be in operation to have offset its own carbon footprint i do not know, but yeah at some point it will swing over into the + side of things.
Unless you are a angler, cuz dams / power plants are no good for the local salmon stocks, and i assume other species too, the largest river here in Denmark saw a power plant being build making the Tange lake and that along with other dams further upstream wiped out the local stock of salmon, so the fish in the river today are a DIY hybrid stock made up of several branches of Atlantic salmon, and as i recall these stocks still to this day have to be replenished as Tange lake are still there, though some dams further up have been taken down.
There is a salmon bypass at Tange lake, it just dont work very well even if what is there now is V 2 or V3 of the so called fish ladder.
Tange hydro electric plant ( with a drop of 16 foot or so ) dont make much power, really it should be dismantled or the river at least made to bypass the lake, but to this date it is a very hot potato, that also came un in the municipal elections we just had here.
So there are probably still a environmental issue with a dam, but of course not one that will make global temperatures go up and up.
Also some places a dam make good sense, just not here as Danes are not drinking river water, we only have ground water,,,,, well for a while
more and more wells come up polluted.
Americans might have to start debating is using all that water to grow stuff in a desert are worth it,,,,,, though that will have a impact on many things i like, my beloved orange juice, it might have to go the way of the do - do.
The #2 largest river here the Skjern river, was also pretty much wiped clean, but good fortune would be that a few 100 of the original stock was found in a small side creek, so there things are better after removing dams and reestablishing some of the twists and turns of the river that had been straitened out to a canal.
We still have power plants here on the old burn and run recipe, but i think today most now burn biomass and not coal, though the heritage of that biomass are still debated hotly.
At least we do get both power and heat out of those, never seen a cooling tower here in the country, first the steam go thru generator's, then it go into pipes where it heat water in peoples homes, and then somewhat colder it go back to start all over.
I do think most power plants here have had Co2 scrubbers on the chimney for many years, even if those are like peeing in your pants to keep warm in winter.