A sharp break with the UAE underscores the North African country’s ambitions to reassertits presence on the international stage after decades on the periphery.