I was consulted on a case the other day where a person had pleaded guilty to misdemeanor possession (of something that’s not marijuana) over his lawyer’s warnings that it make him removable. The judge also (post-Padilla) made sure that the person knew that there could be immigration consequences. But all the person could hear was that the prosecutor would be asking for probation if he accepted the plea deal (which was also the likely sentence even after trial).
So you can guess what happened. After an ill-advised trip abroad, the person received a Notice to Appear in immigration court. As a legal permanent resident with medical issues, he was eligible for cancellation of removal (which he ended up getting, with a sympathetic judge). But it could easily have gone the other way. Cancellation is a discretionary remedy, which means that the judge could have denied it if he had a good reason to do so.
I would recommend that a legal permanent resident or anyone else who is not a citizen do everything possible to fight getting a controlled substance conviction, which makes a person removable under the immigration laws (and in most cases, I recommend that citizens also fight). When you plead guilty you have a 100% chance of conviction. Unless you are getting a significant benefit (having the government drop other charges, etc), it rarely makes sense to plead guilty to a misdemeanor possession charge. There may be grounds for a motion to surpress the arrest and evidence and you never know, the government witnesses may fail to show for trial.