The reason the basketball weighs more when you add air is that air has weight. Even though we can't see it, air is made up of many tiny particles.
Each particle has weight and moves very fast. Because there are so many particles, they are always banging into anything that gets in their way.
One particle by itself doesn't weigh much, but when you have lots of air particles together, the weight of the particles adds up. The more air particles you add to a basketball the heavier it gets.
When it's pumped up really high, the added weight is about five grams--the weight of two pennies.