Let's have an exercise of clear thinking here as we dissect this problem. Vanity, according to Webster, is being excessively proud of oneself or one's qualities or possessions. Praise on the other hand, is to commend the worth of. So both praise and vanity relate to worth. Praise is ascribing worth.
Vanity is a distorted sense of worth.
I think that a person who raises this kind of issue about vanity isn't objecting because they think that praise per se is foolish. In other words, that praise in itself is irrational or unreasonable. When we praise someone, we acknowledge a certain kind of worth that person has. We saw he has produced something of worth or he manifests in his person or in his character something of worth. Praise per se is only foolish or irrational if there is nothing of worth in anyone in the whole world.