Hey there, MeditationBowl.
I agree with you: I don't think that it's okay for anyone to assign others any kind of sexual identity, and I agree this was a boundary violation. That's something that's only our own domain for ourselves, and should be respected as such. Even if you do have homophobia to unpack (and who doesn't?) and even in the event that you find or feel you are (now or later) some kind of queer, this wasn't okay.
About gaydar: as much as some of us who are queer can feel like gaydar is a real thing we have -- and it really can feel like it is sometimes -- studies have made pretty clear it *can* be a thing in some ways, but is still pretty unreliable a lot of the time, even when it is. Even though something like it does probably exist, it's not a superpower, and it sure as heck isn't an exact science, to say the least. Here are a couple pieces on this if you want them for yourself or to share: https://kinseyinstitute.org/news-events ... gaydar.php
and https://www.iflscience.com/environment/ ... ng-gaydar/
and http://www.stat.columbia.edu/~gelman/re ... aydar2.pdf
And by all means, someone else can't know more about your sexual orientation than you do like it seems your friend is -- very disrespectfully -- suggesting. You not only are the one who will know best, again, it's not for other people to assign to you. I'm so sorry that your friend did that and did it this way. I can understand why you're feeling the way you are.
Moving forward, I'd suggest you have a talk setting some boundaries with your friend, if you haven't already. Do you want some help with that?