The Ankylosaurus will not attack you in the wild unless you attack first. When battling you can run away quite easily, just be aware, they have high health, so if you plan to kill one make sure you have enough stamina and resources to kill them.
I just encountered an anky I thought to tame it because at that time I oonly had Dodos and dilophosaurus.so I decided to try to tame it but no suddenly an carno came and killed. Now I'm thinking to tame the carno.(This the first time writing)
Tame one, lvl up health, stam, speed and damage as high as possible then go destroy rock golems and gather rare resources. Best dino for it. Tamed 3 and destroyed a golem in 3 whacks of their tails. Happy Hunting.
Won't attack you unless you attack them first Ankylosaurus is basically a slow tanky dino when facing an ankylo ranged weapons are your best chance their high health pool means their hard to beat but even a basic bow and arrow can kill them if you can't fight then run they deal considerably high damage and can destroy your basic wooden shield in 5-9 hits of it's tail melee combat isn't advised but if you can manoeuver constantly and attack it's blind spot you got a chance
I find the ankylosaurs is surprisingly a very good swimmer , or well good at floating and swimming it for submerging and going down ,but still better at submerging and going down than most dinos so I guess it could be used for oil but still , down try escape from one in water .