Second Council of Nicaea
Second Council of Nicaea, Canon XXI
Definition of faith, attached acclamations and twenty-two canons; not the full proceedings
Canon XXI
That monks are not to leave their monasteries and go into others.
A monk or nun ought not to leave the monastery to which he or she is attached, and betake themselves to others. But if one do this, he ought to be received as a guest. It is not however proper that he be made a member of the monastery, without the consent of his hegumenos.
Translation: Henry R. Percival, The Seven Ecumenical Councils, NPNF II.14 (1900), via CCEL.
Source: Second Council of Nicaea (CCEL)