If the ball is inside the eyelid, it is probably a chalazion - a type of swelling that is caused by the blockage of a gland. It resembles a sty to some extent but it is not a sty.
You can apply a warm compress over it 3 times a day ffro 10 minutes each time. If it does not resolve in 1 week, you will need to see a doctor for antibiotic eyedrops. if it still does not resolve, the chalazion will need to be removed.
Please see here for more about chalazions:
I hope this helps.
Let me know if you need more input. If not, please click on the green"Accept" button on this page. A positive rating and adding a bonus will be warmly appreciated.