Regretted imprisoning a bird (5)
I believe the answer is:
'a bird' is the definition.
(egret is a kind of bird)
'regretted imprisoning' is the wordplay.
'imprisoning' indicates the answer is hidden within the clue (the answer is imprisoned within the clue).
'EGRET' is hidden in the letters of 'regretted'.
(Other definitions for egret that I've seen before include "Seabird" , "(Usually) white heron" , "Greet (anag) -- wading bird" , "White-feathered wading bird" , "Stork-like bird" .)