It is an outdated expression in US English. I've read it in dialog in old books. I've never heard it used in real life in my lifetime.
It's usually used in the first person, "there ain't no flies on me." It means "I am active, I am alert, I am not naïve, I am not gullible, you can't fool me."
A folk song or songs has various versions of the refrain,
"Oh, there ain't no flies on me, there ain't no flies on me
There may be flies on some of you guys
But, there ain't no flies on me!"