This is a very difficult and uncomfortable situation. The parent could seek professional help, like a family counselor. A counselor can guide the family in dealing with this situation in a healthy way. They can explain to the person who engaged in the inappropriate behavior the psychological and social reasons why it's wrong. They may also help the family to improve communication and respect for each other's boundaries.
Well, in this situation, the person who did this inappropriate act needs to understand the concept of privacy. The parent can have a serious talk about respecting personal space and social norms. They might say 'We all have private parts of our lives, and this is one of them that should be kept private at all times.' This helps the person to be aware of what is appropriate in society.