The ball might be part of a check valve in the tank cap. Many people defeat the check valve to make the tank vent better which makes the bike run better.
'03 KTM 450EXC
"If you know what you're doing, then you aren't learning anything." - A. Lincoln