If in doubt, always call your vet or the Animal Poison Line immediately.
Cat food is formulated for cats which have very different nutritional needs. It is much higher in protein and fat than dog food. Regular consumption can cause weight gain, digestive upset, and put strain on the kidneys and liver. An occasional mouthful is unlikely to cause harm.
No action needed for a one-off nibble. Keep cat food out of reach if your dog regularly helps themselves.