Yes, it is LEGAL to sell your avatar. If you sell it you will not have the local police turning up and arresting you as you have not broken any laws.
HOWEVER, it is against the Terms of Use, so MA can close the account of the sold avatar if they so wish, when the find out about the transfer of ownership as the avatar is not registered in the name of the person running it.
It's a bit like failing to make the payment on your car is not against the law, but you can still lose the car if you do not make the payments.