Prisoner gets medicine, perhaps, to obtain sense of right and wrong (10)
I believe the answer is:
conscience
'sense of right and wrong' is the definition.
(synonyms)
'prisoner gets medicine perhaps' is the wordplay.
'prisoner' becomes 'con' (abbreviation for 'convict').
'gets' is a charade indicator (letters next to each other).
'medicine perhaps' becomes 'science' (medicine is a kind of science).
'con'+'science'='CONSCIENCE'
'to obtain' is the link.
(Other definitions for conscience that I've seen before include "Sense of morality" , "The still, small voice" , "Sense of moral correctness" , "morals" , "Hamlet blamed for cowardice" .)