I think the title says it all. If you think a question is a duplicate or should be closed for any other reason, should it be acceptable for you to submit an answer before you vote for it to be closed? Potentially the member is then gaining rep and then denying anyone else the opportunity to do this themselves. I am not referring to any specific instance or member - I have seen this several times and commented more than once.
My view would be that it is against the spirit of fairness that I think we all believe in.
As pointed out by @user56656 the rep thing is not really relevant. What is more important is that the member who has answered is then blocking other members from answering and competing with their answer. To be honest, I don't even know if it really matters. I have seen questions that have been closed which I would have had a try at and then seen that several of the people who voted to close had an answer already there. Guess it is my British spirit of "fair play" coming through. It's just not cricket!