The BBC has emailed all news staff warning they could face internal sanctions if they express strong political views on Twitter, after several members of staff went public with their complaints that BBC programmes are debating the rights and wrongs of teaching children about tolerance for LGBT people.

BBC Breakfast presenter Ben Thompson was among the staff at the broadcaster who publicly criticised Question Time last week for allowing an audience member to ask the question: “Is it morally right that five-year-old children learn about LGBTQ+ issues in school?”

Many LGBT members of staff at the BBC have privately told the Guardian of anger within the newsroom at how the BBC has allowed to turn the issue into a valid debate on the public broadcaster, following protests by mainly conservative Muslim parents in Birmingham and Manchester.

On Thursday the director of news, Fran Unsworth, told staff to stop expressing strong political views on social media and to stop publicly criticising colleagues, warning that they could face “appropriate action” if they breached the rules in future.

“We all have personal views, but it is part of our role with the BBC to keep those views private,” she said in an email to staff. “Our editorial guidelines say BBC staff must not advocate any particular position on a matter of public policy, political or industrial controversy, or any other ‘controversial subject’. That applies to all comments in the public domain, including on social media. There is no real distinction between personal and official social media accounts.”

“We are living in a period of highly polarised opinions on a range of subjects and the BBC frequently faces criticism for the way we report and analyse events, with our impartiality called into question,” she said.

“Many of these criticisms are unfounded and we are prepared to defend ourselves robustly where necessary. We also need to make sure our own house is in order.”

BBC sources said that the news management team are thought to have issued a warning to Thompson, who on Thursday tweeted “thank you for all your messages” after being inundated with support for his criticism.

Internal BBC LGBT representatives have also complained to senior management including Unsworth and editorial director Kamal Ahmed about the handling of the issue, contrasting the public-facing stance on the issue with internal pledges to make the BBC a welcoming place to work for LGBT employees.

Many staff also contrasted the warning with the treatment of BBC political interviewer Andrew Neil, who has never apologised for publicly describing an Observer journalist on Twitter as a “mad cat woman”.

However, other BBC insiders insist the real target of Unsworth’s email was to stop a generation of older male BBC reporters such as John Simpson sharing their views on Brexit.

A BBC spokesperson said: “This was a general reminder to all BBC news staff about social media guidelines and made no mention of LGBT issues”.

Last week the BBC director general, Tony Hall, acknowledged that public trust in the corporation’s impartiality had taken a hit in the febrile atmosphere following the Brexit referendum, with campaigners on all sides jumping on tweets from BBC staff to make political points.

Among other issues, Unsworth told staff they must not state their political preferences or say anything that compromises their impartiality or criticise colleagues.

She said there was no desire to stop BBC staff using social media but ruled on one of the longest-running debates on Twitter, declaring that putting “retweets aren’t endorsements” in an online biography does not absolve an individual of responsibility.

“Ignoring these rules risks undermining the BBC’s reputation, particularly given our renewed focus on impartiality. We haven’t always been consistent in dealing with this issue in the past, but we cannot afford for this to continue and will consider appropriate action in future.”