When we join ourselves with someone in a sexual union, we intermingle our spirits and our souls. When we separate, part of our soul goes with the other person. If your dream continues, what it means is that a part of you is still 'bound up' or
'tied' to the soul of the former person you intermingled your spirit and soul with.
If you no longer have the dream, all that means is that you have somehow shoved the 'break' or 'tear' in your emotions far enough out of your conscious it is now buried deep inside.
Those old souls ties can and must actually be 'cut' much like one would cut an umbilical cord, but with your words. You can google or search, severing soul ties and find prayers to do so.
Every person one engages in sexual intimacy with causes a literal rip in your soul or your emotions.