Not the exact wording but the general premise behind it is a fair counter point in any disagreement. When someone is attempting to gain a higher moral authority, bringing up any hypocrisy is a reasonable thing to do. If pointing out hypocrisy is then dismissed, it is reasonable to assume the other person is not arguing in good faith and therefore should no be taken seriously.
Wrong, you absolutely can. It’s considered a fallacy, logically or formally speaking, because it doesn’t deal with the actual “point”, but casts aspersions on whomever’s motives or fitness to deliver it. If you are strictly debating Topic X then that is technically (or logically, or whatever) irrelevant. In reality, if someone is moralizing at you then their being immoral or amoral is actually pretty significant.
If any given person is saying [something you’re doing] is morally wrong, then you’d be naturally less inclined to take that feedback from e.g. Hitler. I hope. Formally that is an error, in reality it’s still sort of a reasonable thing to keep in mind.
Given a valid structure, true premises must necessarily lead to a true conclusion. A fallacy is an invalid structure; therefore, you cannot know whether or not the conclusion is true. If you can’t know the truth value of the conclusion, you wouldn’t be correct to reject their argument.
Using the go to example: Plato argues P1) All men are mortal, P2) Socrates is a man, C) Socrates is mortal. Valid structure, sound premises, the conclusion must be true.
Using the smoking example: P1) Person A claims smoking is dangerous, P2) Person A smokes, C) Smoking isn’t dangerous.
This argument is invalid in structure because Premise 2 is fallacious. Premise 1 doesn’t connect to Premise 2 to lead to the conclusion. Given no additional information, you would not be able to ascertain the truth value of the conclusion, it may or may not be true using this deductive argument.
But if Hitler said, “it’s not right to just go around killing people at random” it wouldn’t be false because he’s Hitler.
If you don’t trust someone for whatever reason (hypocrisy or what), then the best you can do logically is look more closely at their argument for flaws. Logic doesn’t care about morals or hypocrisy and it’s just not that easy to prove or disprove things. Hypocrites can be right and honest people doing their best to present a good faith argument can be wrong.