The student, who does not wish to be named, contacted news website PinkNews after he attended Edinburgh Pride last weekend.
The teenager, who is a student at Catholic St Kentigern’s Academy in Blackburn, claims he was told by staff to remove the rainbow badge.
Speaking anonymously, the student said: “After I got upset about it I was told by the teacher who told me to take it off that the school had ‘no problem’ with me being gay, but however I’m ‘promoting’ it by wearing the badge.”
He said he refused to take the badge off.
“I told them that I was refusing to take it off. I was then told by another senior member of staff, who I had a really good dialogue with, the exact same thing,” he explained.
The school’s uniform policy states that students must not wear jewellery which could be seen to: encourage rivalry, cause offence, damage flooring, promote a message contrary to the values of the school of the council, carry advertising or could be used as a weapon.
The student said: “I was told by the senior staff member that the school was okay with my sexuality, I just can’t promote ‘it’.
“I said to her that I wore the badge because it was the only place where I feel safe about my sexuality and she told me ‘you don’t need to wear a badge for that’.”
“I feel shocked by the whole thing as well as scared as I no longer feel comfortable going to school.
“I feel I am going into a place where there’s homophobia from staff members. Which feels much more scarier than when I encountered the same from other pupils,” he explained.
“I feel there is a lack of understanding of what I am wearing, its significance, what it stands for, as well as what it doesn’t stand for,” he added.
West Lothian council has been contacted for a comment.