Hi Aadya,
If I understand you correctly, I believe your "riddle" can be solved as follows.
A synonym for to protest or show dislike is the word object, with the stress falling on the second syllable of the word. We hear the word used this way in a court room where a lawyer may object to the line of questioning.
A synonym for a thing or an article is the also the word object, but when used that way, has its stress on the first syllable. When we talk about parts of speech, for example, there are subjects, verbs, pronouns and objects to name a few.
The word object fits both of your definitions and is called a homograph, or a word that has the same spelling but a different pronunciation and meaning depending on the context.
I hope this is helpful to you.