"Can someone get in trouble for buying or even selling a auto while it is under a Lien?"
*** The real answer is..... maybe.
Are you the buyer or the seller??
If the buyer, then you may have a problem with the title. In most states, the lienholder keeps the ORIGINAL (negotiable) title and the vehicle 'owner' (in possession) has a non-negotiable title. In the event that the 'owner' (borrower) defaults on the loan payment, the lienholder retains a security interest in the vehicle allowing it to repossess the vehicle. Further, most lender agreements include a clause prohibiting the borrower from transferring or disposing of the secuity (vehicle) without permission of the lienholder. Simply, if that permission was not obtained, the lienholder has a superior right to recover the security.
If you are the seller, you would have to pay off the vehicle first to obtain a negotiable title, prior to having the right to transfer or dispose of the vehicle.