Pest had done wrong but was in the right (6)
I believe the answer is:
rodent
'pest' is the definition.
Although both the answer and definition are singular nouns, I don't understand how they can define each other.
'done wrong but was in the right' is the wordplay.
I cannot really understand how this works, but
an anagram of 'done' is 'oden' which is located in the answer.
'the' could be 't' (the is pronounced as a 't' sound in some dialects) and 't' is located in the answer.
'right' could be 'r' (common abbreviation) and 'r' is located in the answer.
This accounts for all the letters.
This explanation may well be incorrect...
'had' is the link.
Can you help me to learn more?
(Other definitions for rodent that I've seen before include "Eg, capybara" , "Nibbler" , "Eg, mouse, squirrel" , "Toothy mammal" , "Small gnawing mammal" .)