I've been wearing yoga pants to the gym for years, no hrt, no tucking, no problems. I've seen this sort of question posted here and elsewhere and I have been responding to not worry about it.
But I am beginning to wonder. The gym I go to is a nicely run place (YMCA) free of the extreme lifters, although there are men and women with well sculpted bodies. I have seen women with overly revealing tops asked to put on a more modest top and men who take off their t shirts to put them back on. Nobody on the staff or other members have ever said anything to me about my yoga pants and racer back top. But with as often as I see this concern, I am am beginning to wonder if, while my yoga pants are not a real issue, they are being tolerated like the member using the equipment wrong, but not Wrong.
I'm not going to change, and when the gym reopens, I'll go back wearing my yoga pants since I really do like them (and I can't stand the feel of the "leather" used on the benches on my skin).
So, if you want to wear yoga pants, go ahead. I find them to be comfortably warming in the cool mornings and breathably cool when I get hot. And I don't have to touch the leather parts!