What is the oldest written source in this country that mentions this right?
Morocco
The earliest assertion of the rights to freedom of association in Morocco is found in a 1958 decree, dhahir 1-58-376. The law gives citizens the right to form associations, with Article 5 setting “forth the procedure for declaring an association and maintaining its declared status” (Human Rights Watch 2009, 7).
Human Rights Watch. 2009 “Morocco: Freedom to Create Associations” https://www.hrw.org/reports/morocco1009webwcover.pdf