An Afghan migrant has been arrested for allegedly sexually abusing an 11-year-old girl at knifepoint in a bathroom at a German special needs school.