Opponents of same-sex marriage are trying to "reintroduce Section 28 by stealth", gay rights campaigners have warned.
The law, which was part of the Local Government Act 1988, stipulated that local authorities should "not intentionally promote homosexuality" or "promote the teaching in any maintained school of the acceptability of homosexuality as a pretended family relationship".
It was repealed by the Scottish Parliament in June 2000.
But the Equality Network, which leads the equal marriage campaign in Scotland, is concerned about recent contributions to the debate to legalise same-sex marriage.
Tom French, policy co-ordinator, said; "We are deeply concerned that opponents of same-sex marriage are attempting to reintroduce Section 28 style discrimination back into Scotland's schools.
"This would roll back equality and have a damaging effect on young people and the wider education system.
"We firmly believe that school should be a welcoming environment for all young people, regardless of their sexual orientation or family situation. Schools have a duty of care to their pupils and it would be wrong to allow discrimination against LGBT people in the education system."
The Scottish Government is currently consulting on its laws to legalise gay marriage, and is seeking views on its Marriage and Civil Partnership (Scotland) Bill and its implications in areas such as education.
Scotland for Marriage, the umbrella group campaigning against same-sex marriage in Scotland, have raised concerns about what will be taught in schools.
The group wants parents to have the right to opt their children out of any lessons that mention same-sex relationships.