The updated Scottish government guidance says that under the law toilet facilities must be "made available on the basis of biological sex".
It also says educational authorities should consider toilet arrangements for transgender pupils, such as "gender neutral provision".
In its previous guidance, published in 2021, the government said there was no law that stated "only people assigned male at birth can use men's toilets and changing rooms, or that only people assigned female can use women's toilets and changing rooms".
It also said that in PE classes organised by sex, transgender pupils should be able to take part with the group that matches their "gender identity".
However, this line is removed in the new document.
The new guidance says that it is important to support and listen to young people who say that they "want to live as a boy although their biological sex was female, or they now want to live as a girl, although their biological sex was male".
Denying this could have "a detrimental impact on the young person's wellbeing, relationships and behaviour and this is often clearly apparent to teachers, parents and carers", the guidance says.