Yes, if your pet backpack meets the airline’s pet policy for size (standard size allows up to 11″ for pet carrier height). Soft-sided is best for compressibility. Most Pet Backpacks will fit under the seat in front of your for flying with Dogs on Planes.
Pugs Require a Travel Carrier 1 to 2” larger than other breeds. Breathing, dry-eye, mobility and the tendency to over-heat quickly require special attention to the carrier and the Airline you choose.