An employee always has the right to terminate his or her own employment. Your employer will probably be thrilled if you resign -- it will be one less problem for them to deal with.
Employment agreements and contracts take many forms.