If its rotten it definitely needs some intervention, intervention will range from just a filling to possible Rootcanal or you may even have to get it extracted. The disgnosis may be in these range with your symptoms however they can be presented diffrently as well and the dentist
takes a call on examination:
if its pain with lodgement of food it might just require a filling, if its a continuous pain or u cannot relate the origin of pain to any specific action of yours it must be very well an infection. Depending on the position of the teeth within the jaw and oral cavity and depending on the amount of tooth structure rotten decision of extraction will be made.
If the destruction is minimal limited to the upper chewing surface, and its just a dull aching pain it may get relieved with your current medication. the golden rule for wisdom teeth is there should be minimum three bouts of inflammation around the non carious tooth for its removal.