I don't think it was the ice cream that gave him the reaction, it was probably due to the chocolate and the other ingredients in the chocolate. There are so many "fake" ingredients in those bars, especially the ones that are chocolate or have chocolate coatings, no wonder he had a reaction. Take him to an allergist and tell him/her what happened and have some test run, this should help show the cause.
It can be many things. Allergies do "develop" over time though with more exposure to a substance.
I would recommend that you take him to an allergist with a list of the ingredients in the ice cream bar and see what they say. It doesn't sound like this is the type of allergy that you would want to experiment at home with. Any testing is best done by professionals in a controlled environment who are trained in treating any reaction that might occur. However, many times with toddlers (you didn't give the age of your son) a process of elimination testing at home is done. I still would not do this without guidance from a doctor or his pediatrition.