Syria declared a ceasefire in parts of Aleppo after deadly clashes with Kurdish forces displaced more than 140,000 people.