For a full picture, it might be helpful to go back a bit further.
In 1954, the Soviet Union made Crimea part of Ukraine. With the dissolution of the USSR, Crimea remained with Ukraine. If Russia wanted it back, that should have been negotiated at the time. They had no entitlement to just take it back.
In 1994, the Budapest Agreement was signed by Russia, the US and the UK, to assure Ukraine security in exchange for giving up her nuclear weapons. It looks like all three have violated the agreement- Russia by invading, the others for, well, not assuring Ukraine's security.
In 2004, Victor Yushchenko was elected as president of Ukraine after a repeated runoff election. The repeated vote was ordered after the original election featured massive electoral fraud in favour of Yanukovych. During the election campaign Yushchenko survived an assassination attempt from poisoning. Sound familiar?
You are correct in what you write. For a "fuller picture" it might be helpful to go back to a further point. The confusion with the acronyms was always a pain.
1917, Crimea was part of the Russian Empire.
1921, Lenin made it an "autonomous Republic" with the Russian SFSR, in what eventually became the USSR. So Crimean ASSR part of the Russian SSR, the Ukraine is it's own SSR. Crimea still part of Russia but with a special autonomous status..
1945 After German occupation, Crimea was "downgraded" to The Crimean Oblast, and was stripped of it's autonomous status and was incorporated into the Russian SSR.
1954 Khrushchev transferred it to the Ukrainian SSR. Some say as a "gift" commemorating the 300 year old anniversary of the Cossack State pledging allegiance to the then Tsar of Russia. Other Russia watchers say it was because Khrushchev although Russian born near the Ukr border had a soft spot for Ukr because he witness Stalin's purges there in the 1930.
Correct me if I am wrong. In US terms,
In 1921, Crimea was Long Island with an autonomous status within NY state,
In 1945, Long Island gets downgraded and now part of NY State.
In 1954, Long Island gifted or moved to Connecticut.
Whatever the case. The key point is the lack of clarity and enforcement of the Budapest Agreement.
They did not have any right to take it back. Many have speculated that Putin the reason he gambled that the West would do nothing major when they moved into Crimea was Western behaviour in the Syria Civil War in 2012-13.