Doctor’s alter ego trapping rodent in compound (7)
I believe the answer is:
hydrate
'compound' is the definition.
(hydrate is a kind of compound)
'doctor's alter ego trapping rodent' is the wordplay.
'doctor's alter ego' becomes 'hyde' (Mr Hyde, alter-ego of Dr Jekyll).
'trapping' means one lot of letters goes inside another.
'rodent' becomes 'rat' (rat is a kind of rodent).
'hyde' enclosing 'rat' is 'HYDRATE'.
'in' acts as a link.
(Other definitions for hydrate that I've seen before include "Give water" , "Cause (something) to absorb water" , "compound" , "Apply water" , "Supply liquid" .)