OTOH, the decision to bomb Hiroshima and Nagasaki might not attract as much moral outrage if a demonstration bomb was used and failed, as it would vindicate the idea that only targeting a city would get the Japanese to surrender.
Yeah, but most of that moral outrage developed later. Aside from the Vatican, which apparently issued a letter decrying the deployment of nuclear weapons, everyone was ecstatic. I remember reading that apparently a poll by some magazine indicated that a lot (like, more than 20%) of Americans wanted to drop even more bombs on the Japanese. That said, there was definitely censorship by the US, in particular of things like graphic footage of survivors that might have swayed opinion. And there were, of course, some scientists in the Manhattan Project who spoke against the use of atomic weapons even as they developed them.
But for the most part, criticism of the decision to bomb Hiroshima and Nagasaki wouldn't start until well after the general anti-nuclear movement got going, and, frankly, I'm not sure how much a demonstration first would sway them, particularly considering how opposed much of the movement was to any nuclear technology, including tests and power generation.
It's very easy to forget how different people were thinking at the time and back-project modern sensibilities onto combatants in WWII. Don't forget that the public at the time cheered the wholesale firebombing of German and Japanese cities at the time, and if there was famously some unease among British elites over the bombing of Dresden, the Chief Air Marshall wrote a rebuttal to that saying that he considered it to be hypocritical and having more to do with Dresden's mythical position in European culture than with anything to do with the deaths of thousands of Germans. Churchill circulated a memo that was basically a spineless act of ass-covering, recouching the issue in terms of some sort of cold-hearted efficiency instead of a humanitarian plea.
It seems to me that the moment has come when the question of the so called 'area-bombing' of German cities should be reviewed from the point of view of our own interests. If we come into control of an entirely ruined land, there will be a great shortage of accommodation for ourselves and our allies. ... We must see to it that our attacks do no more harm to ourselves in the long run than they do to the enemy's war effort.
The point here being less what Churchill actually thought, and more that the contemporary environment was such that a Prime Minister speaking against wanton destruction got successfully shouted down by the head of his Air Force. Even if Truman had been against the bombings (he wasn't), or Stimson had been (he wasn't), MacArthur, LeMay, and Arnold are all going to be clamoring to do them anyway, and most of their subordinates are likely to support them.
It's like, I dunno, people today (and, honestly, since immediately after WWI) decried and decry the use of gas during WWI, but at the time both sides embraced its use quite enthusiastically (and this despite it being against the Hague Convention!).