Once the ticket is created, click on Update. This will open the ticket settings panel.
Scroll down to the Add Attendees to Group Membership section.
Finally, click on Save Changes.
When user register/buy ticket for your event, these attendees will be added to the selected membership for the selected group.