Obviously the bombs killed fewer people than a full scale invasion of Japan (and from the perspective of the US, the only casulities were Japanese, not American and Japanese). But many historians would argue that a full scale invasion of mainland Japan was never going to happen after the USSR decided to engage Japan as well. The writing was on the wall.
That said, I think you have a good point using the counterfactual of what would have happend if anyone else got to the nuclear weapon first. Germany would have absolutely nuked anyone and everyone if they could. Japan might have as well (not sure what they would have used it against, maybe the Panama canal? I don't see how they could have launched one against mainland USA without an ICBM). The UK and USSR probably would have if they could.
Basically anyone that showed the stomach to firebomb entire cities would also have used the nuclear weapons of the day if they could.
It also took a couple of years before the full appreciation of the dangers of nuclear fallout became apparent. Not to mention, the nuclear weapons used in WW2 have a tiny yield in comparison to modern nuclear weapons.