This makes me extremely uncomfortable. I was in a similar situation at school. We had an 'odd' boy in our class, looking back I would imagine he is on the spectrum for ASD, but at the time he was just the weird kid.
As a nice, quiet girl I was always expected to be kind to him, to include him in group activities, always was the one asked to partner him in class activities.
He would make leud, aggressive and sexual comments to and about me and my friends. He would tell me that he wanted to die and talk about being depressed. He would spit on the table then lick it up because he said he was thirsty, he would blow his nose into his hand and sit and examine it, he would put his hand in his pants in the classroom.
Teachers would never respond to his behaviour, they'd tell us it was 'just Joe' and that's what he was like. I was never aware of any attempts to help him with appropriate social behaviour. We were just told to be kind, in other words, put up and shut up.
And inevitably, he was bullied. And by proxy, so was I. People would taunt that I was his girlfriend, which he didn't exactly discourage, and would say things like that he would bring a rose to school for me the next day. I was mortified and me an my friends weren't confident enough or strong enough or even bloody popular enough to be able to field that.
So yes, we would end up allowing or in some cases joining in what you'd probably call bullying behaviour (telling him to go away, calling him a freak etc) but what the hell were we supposed to do?! We were getting bullied for trying to negotiate ways of being nice to him, all while he was a thoroughly unpleasant individual to be around.
We told a teacher when he called my friend 'the daughter of a bastard whore who deserved to die' during a maths lesson with the deputy head. She just laughed, because 'its just Joe'. Then told us to be nice to him 
I'm not saying its ok to bully him, I'm not saying that OP's DD shouldn't be polite to him, but I sure as hell am saying that she shouldn't be expected to deal with it. It takes a very strong kid to be able to fend off bullying on someone else's behalf. Let alone the inappropriateness of 'forcing' friendships.
Maybe the HT doesn't know, but they should bloody well make it their business to know the dynamics before giving out commands like this. And who's to say OP's DD has tried to speak up, like my friends and I did?