Yes it can. Chocolate contains both caffeine and theobromine. Both of these drugs can be toxic to a cat.
These drugs are two different types of stimulants that affect the central nervous system and the heart muscle, as well as increasing the frequency of urination. For a cat or dog to lick the remains of an ice cream from a bowl is unlikely to cause any harm at all unless the animal has a specific medical condition already.
However, if the animal was to eat a larger quantity of chocolate he may become very sick indeed and develop vomiting or diarrhea. When the amount of chocolate eaten is excessive, symptoms can include restlessness, hyperactivity, muscle twitching, increased urination and/or excessive panting. White chocolate has the least amount of stimulants and baking chocolate or cocoa beans have the highest. A better idea is to buy chocolate drops which are made specifically for pets, as they will not harm your pets' health.