Why did this happen? I'm afraid I might cheat?

I'd like to first off point out. I have never cheated before nor thought about it! I'm 18, have been in a relationship for 2 and a half years I have always been loyal, and I have my limits when it comes to other guys that are not my boyfriend. I do have male friends but I never spend alone time with them, I don't allow them to flirt with me and if they do I cut them off, I've never once considered cheating on my boyfriend, I love him, extremely much, I am loyal to him, he is not my first boyfriend but he was my first kiss, first lover and first person I've ever fallen in love with.
Pretty much my first everything. I feel he has never cheated on me. And the only times I've felt insecure about other wise was when we once broke up and had a rough timing of over 5 day apart barely communicating. When we started again things felt distant and I was worried he had started talking to someone else during those five days.
And wasn't sure about getting back with me however things went back to normal.
I have my in security's however last night I dreamt very vividly that I cheated on my boyfriend. Worse is that the guy is someone who is a friend of both of ours. He has known my boyfriend for a while but I only recently started become friends with him.
Are friendship is pretty basic, however the only thing I've pulled back on was this guy once reached for my hands claiming his were cold which they were. He held on a bit to much for my comfort and every since when he's tried again I pull away and tell him to wear his jacket. I find my boyfriend much more intelligent attractive and we'll rounded then this guy. I really don't find much attraction to him other then he's laid back the attraction isn't strong eother it's a simple I think he is an OK person attraction.
However in the dream, he are pushed me three times attempting me to sleep
Why did this happen? I'm afraid I might cheat?
1
1
Add Opinion