Are you still there?
Where did you put the picture up???? If it moves it could be a warble fly larva. Does it have a darkish part at the end????
For those trying, I don't think they're taking pet pictures anymore. But...
The big danger here is if the following happened;
Sometimes cats will eat "strange things" and in the process they'll pierce the inner cheek/gum and get lodged between the inner and outer layers of skin.
The bad smell is infection (of course you know that!). But if there's a foreign object in there, it must be removed. Otherwise, it will cause tooth loss, loss of the lower jaw, even death. I'd advise taking him to a vet to be sure.
I've dealt with this, and the removal can be tricky and dangerous (we once had a cat that somehow got three inches of string lodged in the cheek pocket. It pierced the inner and came out the exterior cheek, It looked like a strange, white blob sticking out of the infected area. Once we removed it (carefully!) we were able to clean the area and administer antibiotics, cleaning up the mess. Luckily, no permanent damage was done!