Whoever told you that have isn't used in the present continuous was wrong - or more likely, what you were told was incomplete.
When we use have to mean possess, we don't use it in the present continuous. But in other uses, the present continuous is possible and even common:
I am having (eating) lunch
I am having a good time
I am not having any luck with this
I am having second thoughts about this
I am having a baby
I am having people over for dinner
When we say I am having a relationship, the word have does not mean possess; rather, the phrase means I am in a relationship.
This particular phrase is more complicated than some of the examples listed above, because you can possess a relationship - or something close. If I say, "I have a relationship with my father," this is (more or less) the possession meaning of have. So I cannot say, "I am having a relationship with my father." Or rather, I can, but it would sound strange, because it would imply that I am in a romantic relationship with my father.
This is just another of those annoying things about English. Relationship has multiple meanings - one being romantic, one being platonic or familial. Typically, we use a different verb for those two meanings: be in a relationship is romantic; have a relationship is not.
And, if that weren't already confusing enough, having a relationship means being in a romantic relationship.