I actually do this too?
I don't have a job but I have a credit card. I used to just spend small amounts that I knew I could pay back just to build my credit, and now I use it for things that my parents normally pay for but I have to get on my own, like prescriptions. So my mom pays the bill, lol.
But. I think it's a good idea to have it and do exactly what you said. As long as you make sure you can keep up with the payments, it's good to build your credit because it will help you out so so much in the future.