Short answer
Yes, training your dog to 'leave it' is a great way to prevent them from eating cream, which is high in fat and can cause pancreatitis. Store cream and desserts securely out of reach when you're not supervising. If your dog does get some, watch for vomiting, diarrhea, or a loss of appetite and contact your vet if you see these signs.
Cream — Food safety facts
Feed with care · Dogs · full breakdown on the linked food page
Very high in fat and can trigger pancreatitis. Avoid, especially in cats.
The full verdict, portion guidance and serving notes are collected on the Cream food facts page.