No, it is not necessary to have a membership (individual or institutional) before submitting to our journals. Some memberships do offer Article Processing Fee waivers. Please check out our memberships page for more details.
Related:
Why should I consider an institutional membership?
How can I find out if my organization is already a JMIR institutional member?
My institution is an institutional JMIR member. Do I still have to pay the submission fee?