Lung-worms can be treated with Fenbendazole (Panacur-C).
I dust my frogs food with it for 3 days on the first of every month, it is very safe. I also do random fecal exams and they have always been acceptable since I started using this maintenance program. It likely had the worms already when you brought it home. I recommend always treating for parasites on a new arrival while it is in it's quarantine period (30 days).

Note: You have to do more than one fecal exam to be positive because the animal may not be shedding during the first fecal. Also, the fecal exam may have showed parasites but the tech doing the exam may have determined it to be too few to say your animal was infected.