I worked at a Petco and in order for your dragon to see a vet, you will have to relinquish/return him so custody is transferred back to Petco. You will likely have the option to repurchase, but legally they can't tell you what the vet said, what's wrong, or what meds he might be on. You also can not buy him back until after his treatment, if any is deemed necessary, is completed. Though it is admirable to want to save an animal, know that buying that animal from the store only encourages their cruel practices. You have to think about it in a supply and demand sort of way. If you ever see an animal at a store in need of rescue or vet care, speak to the manager and offer/ask to adopt the animal for free. Most stores will do that as it's cheaper than paying for the vet visit. Also, PLEASE call the number on the outside of the habitats and report the store and the mill. When I adopted a Leopard a Gecko from a store that died a day later, I called and reported the mills they use for constantly sending in diseased and ill animals.
And just as a thought, if you can not regularly afford veterinary care for an animal, it may be best for that animal to be with someone who can.
I wish the best for the dragon.