Answer: What I've found in the realm of gardening is that the dose makes the poison. In other words you can consume a small amount of something and it won't harm you but if you consumed a great deal of anything (from water to candy), it could poison you. So the squirrel who's eating the ant traps will probably not suffer any consequences at all - not even a tummy ache. Ant traps are mostly boric acid - a small amount will be lethal to a tiny ant but not so for a larger squirrel. So your squirrel pest would have to consume lots and lots of the ant traps for them to have any effect.
As for keeping your garden safe from squirrel, there's not much you can do aside from completely caging it in. Since that's probably not an option, you might try a few of these strategies:
You can place loose plastic mesh over flower beds at planting time. The plants will grow through the mesh, but squirrels will be prevented from digging.
Use motion detection sprinklers in the garden where squirrels are a problem. A sudden burst of water will frighten them, at least temporarily. Motion detecting lighting is of no use because tree squirrels are not nocturnal.
Cover spring bulb beds with fine plastic mesh. Secure it along the sides of the beds with bricks, stones or lumber. By the time the bulbs are up in the spring, you can gently remove the mesh.
Place ground chili peppers in flower pots and garden beds. Use the hottest chilies you can find, the little Thai chilies are excellent, so are habaneras and cascabellas. The capsicum in the peppers makes for unpleasant digging. The term 'hot foot' applies here.
Best wishes with your landscape!
Q&A Library Searching Tips