"I think it's really unfair that my brothers have been allowed to wear shorts and all through primary school I haven't been allowed to except when I have sport," the schoolgirl wrote in the letter obtained by Perth Now.
"The dresses are even worse but at least you don't have to wear them!
"I really love kicking the footy, netball and doing handstands at recess and lunch. It is annoying doing these things in a skirt."
She explained the impact that decision had on her and her friends.
"I want you to know that we feel more confident now. I think it should be a new rule for every school, so it's fair for everyone," she wrote.
Moved by the young girl's plea, Ms Ellery met with Sofia and her mum Krystina Myhre and has now asked the Education Department to amend the department's Dress Codes for Students Policy.
Individual school councils or boards will continue to set their own dress codes, but will be told that girls must have the option of shorts or pants.
"An 11-year-old girl should be able to wear shorts to school. In 2017, girls should be able to wear clothes that don't restrict their ability to participate in physical activity at school," Ms Ellery told Perth Now.
The change, however, does not affect private schools, which often require girls to wear dresses.
Sofia's mother has long been a vocal advocate for gender-neutral uniforms in primary schools. She is the WA representative Girls Uniform Agenda, a national group which campaigns for legislative and policy change in this area. She was also a driving force in getting Sofia's school to update their policy.
Ms Myhre now wants private schoolgirls to have a choice.