It also contained three wicks, they said.
The plastic ball was used to fill ice-cream, police said, adding those who had turned up for the morning prayers got suspicious when they found it near the place of worship.
Police said the chemicals were used in crackers.
A case has been registered.