Can mean trouble, as Billy the Kid was (8)
I believe the answer is:
nickname
'as billy the kid was' is the definition.
(Billy the Kid was a nickname)
'can mean trouble' is the wordplay.
'can' becomes 'nick' (both can mean a prison).
'trouble' indicates anagramming the letters.
'mean' anagrammed gives 'name'.
'nick'+'name'='NICKNAME'
(Other definitions for nickname that I've seen before include "Friendly appellation by which person is known" , "Jack the Ripper, for example" , "Familiar term of address" , "tag" , "Familiar moniker" .)