A notary is a person authorized to perform certain legal formalities, especially to draw up or certify contracts. Since it refers to a person or their role, it is a noun. You can say 'a notary public' or 'the notary,' which shows it functions as a naming word.