Breathing in any irritant is bad for overall lung health. I suggest following @cbll 's information on identifying air pollution and guidelines for your given location.
In terms of "...are treadmills sufficient?" Yes and no. Running on the ground is always harder than on a treadmill. Being able to run longer on a treadmill does equate to overall aerobic endurance... Just not on a 1:1 scale. You can try to accurately mimic courses with grade (though downhill sections would require a specialized treadmill mimicking that downward-slope); but, ultimately the treadmill is assisting you to some degree. Defining long-distance is also important... Half-Marathons, Marathons, Ultra-Distance Marathons all require similar but different training that also include strict diet and sleep schedules.
If you are serious about becoming a long distance athlete, it would be a good idea to find a local trainer for more advice. Also, consult your physician to make sure nothing in your medical history contraindicates long distance/endurance training.