There's intention to take into consideration. God knows the heart, if out of confusion or someone out of mockery giving her a toy and allowing her to think she was praying with the aid of a St Anthony statue, her intention is what matters not an object in her hand. Since no where in Catholic teaching are we told that the images/icon/statues are actually the saint they bear the image of, it is safe to assume she never considered that item actually St. Anthony.
Now to your point of walking up to a idol. If she were praying to St. Anthony's intercession due to the sacrilege of having an idol present it would be appropriate, especially considering St. Anthony actually was an exorcist.