RIO DE JANEIRO — The young ballet students walked into the room with red paint — simulated blood stains — smeared all over their leotards.

It was a macabre costume for girls as young as 7 and 8, performing before the mayor and governor.

To understand why their beloved ballet teacher, Daiana Ferreira de Oliveira, put them in those outfits, it helps to go back to a formative day of her own childhood.

Ms. Oliveira was 6 or 7 when her mother first brought her and her two sisters from their home in an impoverished neighborhood in northern Rio de Janeiro to the majestic Municipal Theater downtown for a production of “Swan Lake.”

The family stood out: a black single mother who made a living cleaning homes, guiding her gobsmacked daughters through crowds of mostly white theatergoers and across the gilded entrance of one of the city’s architectural gems for their first ballet.