Please help

I have the best boyfriend. Everything is great when I'm with him, but sometimes I have dreams about my best friend.. When I'm with my friends her and I have a connection. She is in a semi open relationship and when my boyfriend and I weren't so good she told me that if we broke up it would be okay because she can do stuff with girls. I don't want to end the relationship with him but I want her... Please help