i must agree with cheeky teddy, if you were to just shy away from this type of behaviour where would that leave you? (in a situation where your dog has learned that growling and using aggressive behaviour gets him what he wants)
if you had a seven year old that flailed his fists at you and threatened violence because you walked by while he was eating, would you accept that behaviour??
i work with dogs of all shapes and sizes and it is important that you have a trusting relationship, you need to be able to remove anything from your dogs possession without worry of being bitten, this goes for food, treats toys, its important you are able to open his mouth to check inside too (your vet can give you help and advice) what would you do if you were out walking your dog and he picked up something that got stuck in his mouth or even worse throat? also giving medication is so much easier if you are on trusting terms with each other (with my own dogs we are at the stage where i gently hold the top of muzzle, lift head back, say "open wide" and hey presto, a gaping mouth i can drop a pill into!!, they dont like it, but they trust im not going harm them)
it sounds like this is the first time you have had a problem with him so if you normally have good control you should find that if you reach for the treat and give a resounding NO at any growling/snarling/possessive behaviour retrieve the treat, then ask your dog do do something,(sit, lay-down, give paw) and then give praise and return the treat for a bit of a chew, repeat this until there is no resistance, and then keep the behaviour ingrained by practicing this ritual at random times, with random objects he is amusing himself with