Yes, it should be a factor in the decision.
Closing for duplicate is a special case - there is no reason to avoid upvoting the question, or closing a highly upvoted question in that case. The duplicate question could be better asked than the original and worthy of upvotes and attention, which lead people to the other question to actually post answers. That is one of the functions of duplicate questions and why they are not deleted.
Regarding other questions, if the community here thinks that the question is "useful and clear" (language from the tooltip on the upvote button) then it is an indication that it is relevant to the community. However, the votes don't determine the on-topic nature of the question since up votes may be for ancillary reasons emotional reasons about the question, or they represent a different opinion about the on topicness that you, as a user, have the right to vote differently. They are one piece of evidence to weigh in the decision.
The main indication that they serve is that while you can get votes to close a question, SE doesn't support counter-voting to keep it open. The up vote and comments are the only voice that those who disagree with the initial VTC have to express their opinion, and they should be analyzed to see if that appears to be their motivation and if so, consider, as a close voter, to respect that view.