The principal of an Ottawa public school has apologized for asking a student to remove the Palestinian flag as their profile picture.