Leaders of lesbian, gay, bisexual and transgender groups expressed dismay on Wednesday after Pope Francis said that schoolchildren are being taught they can choose their gender as part of what he called an “ideological colonization.”

Francis was meeting privately with bishops in Poland last week when he broached the matter. “Today, in schools they are teaching this to children — to children! — that everyone can choose their gender,” he said, according to a transcript released by the Vatican on Tuesday.

Marianne Duddy-Burke, the executive director of DignityUSA, a leading organization of L.G.B.T. Catholics, said the comments represented a “dangerous ignorance” about gender identity, which is no more a choice than height or hair color.

“It’s very troubling that the pope would say this,” Ms. Duddy-Burke said on Wednesday. “It also shows that the pope doesn’t understand the danger that his words can mean for gender-nonconforming people, particularly those who live in countries with laws or cultural pressures that put these people at risk for violence.”