Equivocation (ambiguity) is a logical fallacy in which someone uses a phrase or a word in multiple senses in an argument.
Stan: Well, I have the right to work on my project, therefore it's right for me to continue doing what I'm doing.
Mary: No one disputes your right to do what you want. But I wouldn't agree that continuing your project is a right thing to do.
Full dialogue here: All argumentation fallacies