Post a picture of the bird in question and we can tell you if it's male or female. At this age, it should be pretty apparent.
Regardless, if the bird's making you uncomfortable, start asserting your self. Walk toward the bird, make it move away from you. Coming to you for treats is fine, but...