Happened to me, I had a crush on a female friend when I was about 15 but I identify as straight. I didn't think about acting on it, I didn't want to act on it. I had a crush on her but I didn't have feelings that I wanted to do anything romantic with her. I didn't even consider acting on it because in my mind it was like by default I knew it was just a little crush, an attraction, but I had no want for a relationship or anything. We were close friends, my feelings for her were friendship, I was just attracted to her too. It was very strange.
It lasted only a few months, and I've never felt anything like it since. I am attracted to guys in the way that I was attracted to the girl, but only if I like the guy enough to be in a relationship with him.
Your situation seems to be a bit different, but it's no reason to freak out. Are you scared that you might be attracted to someone who is not of your preferred gender? I was a little weirded out when it happened to me, but I just accepted it for what it was. It doesn't make you wrong or anything to go against your beliefs about your preferred gender. If you want to ask him out, then ask him out and go with it, it's a learning experience and it will let you learn about what your preferences are. Don't rule guys out is all I'm saying. I haven't ruled girls out, I just haven't been attracted to any again.