The model number for the older (discontinued) ice cream maker attachment is KICA0WH, and it's available here: https://www.amazon.com/KitchenAid-KICA0WH-Cream-Maker-Attachment/dp/B0002IES80 (select the "Discontinued" style from the popup menu). This one will be compatible with your KSM5.
I purchased this for my girlfriend to use on our mixer. She has made some incredible stuff with it.