Ukraine had no choice. They were Russian nukes, and not giving them back would have probably triggered a war immediately. But with Ukraine drowning in pro-Russian influence at the time, there is no chance they would have defied Russia.
They were soviet nukes. Ukraine was soviet land and soviet people too. Breakaways by definition take stuff with them. To claim Russia had a right to the nukes is no different then saying they had a right to the land and people.
They had a choice, they just chose the one that didn't lead to war.
Ukraine was a Sobiet republic under the USSR, as was Russia. Ukraine also took other military stuff, the Black Sea Fleet was fiercly discussed issue as well. Economically and politically Ukraine didn't have much of a choice, sure. Legal ownership wasn't the propblem so.