I will show two examples from Japanese websites.
First of all, from Weblio: 「彼女は私に甘える=She spoils me」
Secondly from some site for Japanese English learners (Gabastyle): 「悲しいことが起きたときには友達や家族に甘えてもいいんだよ=In times of tragedy, it’s OK to lean on friends and family」
As far as I understand these examples, their use of 甘える is totally opposite. The 1st example seems to be showing 私 is the person getting spoiled yet in the 2nd example the に is pointing to the actor doing the spoiling. I understand that the 2nd example takes the second definition but surely the structure would stay the same. Do you have to guess the direction of に ?
I'm probably wrong but I understand 2 weblio 甘える definitions to be basically the same :
1 かわいがってもらおうとして、まとわりついたり物をねだったりする。甘ったれる。「子供が親に—・える」
2 相手の好意に遠慮なくよりかかる。また、なれ親しんでわがままに振る舞う。甘ったれる。「お言葉に—・えてお借りします」
Some sort of selfish action someone takes, hoping for attention from others.
Another possible point of confusion could be from it being intransitive or my knowledge of the English definitions making it seem like it means 2 different(active/passive) things. Just hearing 甘える now makes me wonder to who, by who, is someone being spoilt or doing the spoiling etc. and am completely stuck.