Yes. An air gap in your drain is required as part of your home's plumbing code.
The purpose of an air gap is to ensure that water can only travel one way through the drain: out. Without an air gap, there's a potential for dirty water to wash back into your water softener, contaminating the system's tanks - and eventually, your water supply.