There are two scenarios in this case:
- The partners are in an open relationship and they both accept other (sex) partners.
- The other person does not know about it, and does not accept it.
In both cases there are certain things that need to be taken into consideration, obviously.
What are your intentions? Is it about just having fun? Will you get emotionally involved, and then how far could you go with the person who is in a relationship? Are you in love? Do you want a relationship with them? Are you okay with them being in a relationship? Will you feel guilty about it? Will you be jealous? What are your values? How do you emotionally, mentally and physically protect yourself?
This is something very important to think about before acting, because, like any other behavior, it can create a lot of chaos and suffering. Being aware about your own intentions and your future perspectives in this constellation will help you to really enjoy whatever you are doing.
In the second scenario, it is open to you how far you want to go or how far you can go. If you are sure that you won’t feel guilty (because not everyone does feel guilty about it and that is okay!) and you know what you can expect and you hold responsibility for it, then this seems to be a healthy decision for yourself, and you can fully enjoy the experience.
It becomes more complicated when feelings are involved, because you might think it is necessary to be close to the person. There is an option where both partners are okay with this and they could even invite you to their relationship. Or it is okay that you are spending time alone with that person. This should be clear from the very beginning for everyone involved. So talk about it.
This love affair can be very hurtful in the second scenario. In the end they are exclusive with someone else and it can put you in a vulnerable position, maybe even make you dependant. And here, in my opinion, loving someone can also mean to let them go. Be true to yourself. Is this what you really need?
Since every relationship should give us a chance to grow and expand, always keep your own boundaries and feelings in mind. If your own values are not met and put you in a bad state of mind, then better go in a different direction. But if you are sure that this is exactly what you need, go for it and enjoy yourself!