In order to allow guests to register for a class on the member portal, the following system settings need to be enabled:
Enable Non-Member self-registration: Yes
Enable Non-Member View CMS Page: Yes (Class Schedule, Memberships, and Services)
Online Purchase Settings
Allow Non-Member Online Service Purchase: Yes
Next, create the free class. (See below)
Add the class to the schedule.
Finally, create a service type for $0 for the free class. Limit it to scheduling only certain classes and choose the free class. Set the field Non-Member Can Purchase Online: Yes.
Once these steps are complete, the non-member will be able to purchase a $0 service package and then register for the class. Keep in mind that once a service package is purchased, the guest is converted to a member.