The simple answer is "Yes". Vacuum cleaners with dust bags are generally healthier for allergy sufferers because the bag keeps the dust out of the air.
However, not all bags are created equally. Some bags have large pores which allow allergens to escape the bag.
However, as long as care is taken when emptying the dust bin, bagless vacuum cleaners have much to offer allergy sufferers.
If you have allergies and use a bagless vacuum cleaner, we recommend that you empty the dust bin outdoors. We also suggest that you either have someone else empty it for you or wear a mask.