So, your cat (or any other animal) can't actually trap you - you can walk through them, it's just not obvious how (at least it wasn't to me). I don't know about other controls, but on Android (and I suspect iOS is similar on an iPad or iPhone) if you hold your finger down instead of tapping, the movement will transition from "tap-to-move" mode to "follow-your-finger" mode. In the latter, your farmer sprite will keep trying to walk toward where your finger is even when there is an obstacle. If the obstacle is the cat, after a few seconds you'll phase through it and continue on your merry way.
I also was "trapped" by a dog this way a couple times until someone gave me the tip :)