Air Gap!
Okay. Having installed many a water softener in many a community with many a different code ordinance pertaining to such water softener ordinance.... Here I go.
An Air Gap is a very inexpensive piece of plastic that allows your water softener to drain, but not let it siphon back into your dishwasher. (Contrary to what you may believe, "Air Gap" is NOT a very beautiful Golden Retriever who is a cheerleader for the basketball team. Oh, that was Air Bud...
I'd install it whether code required it or not. It's like seatbelts. Whether I go to the grocery store, or fly 200 miles VFR just for the fun and scenery, I wear them and require my passengers to wear them religiously.
air Gaps are good