Nothing to do with TSA policy, but if you have a Rx for a controlled substance, it must be in a container with your name, the doctor that prescribed it, and the name of the medication.
Even if you have a Rx for a controlled substance and you decide to carry it in a different container (smaller one because you are traveling), you can get popped for it. I have seen it happen.