This would fall under the "statement against interest" exception to hearsay, though, because obviously the person who originally said the thing isn't going to want to admit in court that they were committing a crime.
You aren't repeating a fact you heard him say, you are reporting what you heard him say.
If you want to use someone saying something as evidence in court, they need to say it to the court as directly as is practical. If the person saying it isn't going to say it directly to the court, then it needs to be justified with one of the exceptions to the hearsay rule.
In this example, it would be allowed because the person saying it wouldn't be willing to admit to a crime in court.
It would be hearsay if offered as evidence that you had meth in your pocket. It would not if offered in evidence you were enquiring about the legality, to show intent.