The tone and delivery of this is EVERYTHING. It has to be playful and indifferent. Yes, it's okay for a woman to find other men attractive. It's okay for you to find other women attractive. It's okay to make a passing comment about it once in a while. We're all human. But make no mistake, if she makes that comment to you, this is a sh!t test. It cannot rattle you. I think simply agreeing, "yeah, he is a good-looking fella" rather than saying "then go fvck him" is the better way to handle it.
If commenting on another men's attractiveness becomes frequent or overt, or sexual, this is no longer a sh!t test. This is disrespect. Disrespect is almost always a symptom of falling attraction. It's usually because you're not enforcing boundaries in other areas of your relationship, OR, (less commonly) because she feels the emotional connection is weak and wants a reaction from you to assure her you still care. You will need to calibrate from there, based on your own audit of your behavior in the relationship. Either way it can be corrected with a behavior shift, but a woman who is disrespecting you like this is usually too high maintenance to be a good long-term prospect. Just know that.
If it's a weak boundary issue, set it straight as soon as you feel it's disrespectful. Just tell her "Hey, that's disrespectful. I'm not drooling over other women in front of you, right?" She will either apologize and comply, happy that you're strong enough to set a boundary, or scoff it off in dismissal. In which case, plan your exit. She's already planning hers.
If it's a weak connection issue, have the same reaction, but tone down the "alpha" game a little and be a little warmer.
Again, you'll need to audit your own relationship to figure out which of these it is.