Your quote-unquote 'teach' suggests that you would rather use another word. I'm slightly amused as I wonder what word you would choose as an alternative.
Flirting usually signals sexual attraction. If we can convince the young woman that her behavior is inappropriate (since the man is married), a waste of time (since she can use her time and effort in attracting someone who is available), and self-destructive (since she is demonstrating poor choice and lack of self-control), we may succeed in getting her to focus on what is best for her now and in the future. Besides there is the Golden Rule: respecting the man's marriage the way she would want another woman to respect hers if she ever becomes a wife.
Tell her to save her charm until she finds a man who brings out her value not her viciousness; to whom she can become a priority, not just another option. It's all about what she thinks she deserves.