I think the real reason this is a confusing issue is we are using the word "right" in different contexts without clearly defining them.
Personally, I would propose a break down like this:
Basic Human Right - essentially something that one "cannot rationally begrudge another person for doing" and while vague, and hard to define, is at the heart of all laws regarding "rights" in general
Legal Right - a legal protection within a society of laws designed to best recognize Basic Human Rights to the best of the ability of the governing consensus.
For instance, we generally believe people have the basic right to govern themselves - to influence the decisions of the government that governs them. This general belief comes from some observation of human nature, and may be imperfect, but it is trying to account for something real in human nature.
Then we have the Legal Right to vote, which is based on our government's solution to try to allow people to govern themselves as per our particular flavor of democracy. That legal right can be taken away, in the case of convicted felons and such. A resident alien does not have that right in this country, to protect diluting that right of full citizens.
Even when it comes to the death penalty, the state may execute a person, which can be viewed as a violation of their basic rights, but at the same time it is to protect the basic rights of the public at large from that individual. (whether or not misguided...different topic)
But the concept of basic rights comes from the simple premise that all men (and women) are created equal, and the tendency in human nature to resist against certain acts of oppression. I'd go so far as to say taxation without representation appears to be inherently unstable due to qualities inherent in human nature.
So, you can think of legal rights as a means to try to accommodate our best understanding of what appear to be basic human rights. A society could say "you have no right to defy the Emperor" but, should the Emperor come up to you and ask you to slit your own throat for his amusement, he shouldn't be surprised if you slit his instead. If he is, then he has little understanding of human nature, and basic human rights.