Do states have the right to become Sanctuary States?
In my opinion, sort of.
No state can make a foreigner a US citizen or change any Federal requirements limiting certain rights or benefits to citizens.
But states are in charge of their own law enforcement, and they are perfectly within their powers to (foolishly)refuse cooperation with Federal law enforcement, up to the point that they begin to violate (constitutional) Federal laws themselves.
So, they can keep information about their detainees and prisoners from the Feds. They cannot physically detain or obstruct Federal immigration authorities from carrying out their work.
A simple reading of the Constitution would give you your answer. Fedgov was delegated power over borders and immigration, so sanctuary states and cities are not allowed.
Fedgov was not delegated power to regulate intrastate pot, so states are within their rightful powers to do so.