First, get your dog checked by a vet. Sometimes older dogs get a thyroid imbalance and other things which can cause changes in personality. Next.....
When we think of punishment, scolding, physical pain, causing fear, we are thinking in human terms. We are thinking that the perpetrator has comitted a "crime" which to us, is immoral, wrong and goes against our value systems of what is right and wrong. Dogs, however do not have the ability to share our morals or values. They have a completely different wiring. Punishment such as described is not what behaviorists, educated trainers and canine behavior scientists would recommend to treat any kind of aggression. It can make the problem worse by creating even more defensiveness in your dog. We're trying to get rid of that defensive feeling. That is what is causing this possession guarding in the first place. Don't turn this into a power struggle. Don't set your dog up to even have that in his mind. Proper dog handling does not mean dominance over your dog. It means training with a brain.
What your dog did is normal in dog to dog interactions....to defend his possession. When it comes to guarding his stuff from his owner, that's when the dog-human relationship has something wrong. He needs to be conditioned to accepting you around "his" food, toys or anything he thinks is his.
When you condition a dog to trusting that you aren't a threat to his things, that having you around his things is actually a good thing, then you don't have this problem.
So, go back to the beginning. Do not give him that toy which he values so highly. Find a toy that he likes, but it isn't his favorite. Create a game-like atmosphere...."we're gonna have some fun!" Get out some high value treats, like small tidbits of hot dog, other fresh meat, cheese and keep them near you on a table. Hold a treat in front of his nose while he is chewing on his toy. He'll probably drop the toy to get the treat. At the same time that you pick up the toy, give him the treat. Make it simultaneous and say, "give." (he's going to learn what "give" means) Immediately give him back his toy. (as he takes it, say, "take.") Praise him and make it like a fun game. Repeat. When he is dropping the toy into your hand and is showing signs of getting "into" the game, not worried about having his toy taken because he gets it right back, start asking for the toy first before he gets the treat instead of at the same time as you did before. "Give"......treat/praise....."take" (give the toy back) That is the sequence and it happens fast....a fun, fast, exciteable game with lots of praise and happy voice.
Next, start tossing the toy just a few feet away and encourage him to bring it to you. Retrieving is part of the fun. He brings it to you or almost to you and you say, "give"....give him a yummy treat and "take"...give it back OR.....toss it again if he loves the retrieve game. Mix it up. Do both. Then put the toy away for the time being.
Put all toys away unless you're playing this game....for a while. Once he gets so he's very willing to give his toy to you, try using a slightly higher value toy and gradually work up. Get him solid and comfortable with you taking his things, rewarding him, giving him back his things right away as a game before you raise the value of the toy.
Hand feed him instead of giving him his meals in a bowl. Ask him to sit first or lie down and give him a handful. Ask for him to shake hands (if he knows that) and give him a handful. Ask him to walk next to you nicey down the hall, and give him a handful. He's going to be earning most things he likes.
Does he want to go outside? Sit first and wait until you give him a release word. Does he want you to pat him. Sit first. Does he do something to get your attention and you look at him? Don't. Get it so you act and he reacts, not the other way around.
He just needs a refresher course in seeing that you provide his resources...the things he likes and needs. You control them. He must follow YOUR direction in order to get his goodies. Behavior which is pushy, obnoxious....do not reinforce. Sometimes we reinforce inadvertantly (by mistake). If it's attention seeking behavior, ignore him. Wait for a moment when he's being "nice" and then instigate the interaction. Later on, when he's cured, you don't have to carry all this to the extreme. But for now, I would.
Always figure out what payoff he's getting for some unwanted behavior and make sure he doesn't continue to get it. Make sure that you notice desireable behavior and let him know that you like that. Reinforce good behavior often and lavishly.
Anyone who interacts with him must do the same. He needs consistancy and a lot of reinforcement for the wanted behavior in order to learn how to interact in a way which is acceptable to humans.
Let us know how things go.