The hearing was shown police footage of the teenager wearing a black balaclava, throwing objects and goading police officers.
A bus driver was assaulted during the violence, although the boy was not directly involved in that attack.
The boy, who had his mother alongside him in court, said he was “sorry” and regretted what had happened.
He told the hearing he was going out to get some food with a friend who was celebrating his birthday when he came across a protest outside the hotel.
“I didn’t know it was a racial thing,” he said.
“I just ended up joining it (the protest).”
District Judge Margaret McCormack replied: “Who goes out with a face covering to spend his pocket money?”
She told the boy he “acted like a sheep” and “wanted to be part of a gang”.
The judge said he was “egging people on and being egged on” in a “tinderbox atmosphere”.
“You were not being forced to do anything,” she added.
As well as the youth referral order, the youngster was also ordered to pay £150 compensation to the bus driver.