Some friends would take advantage of you because of how close they are to you and if one doesn't decide to cut ties with such friendship that is affecting them in the negative way, it would keep getting worse. Your friend had to take an advantage on you but you did what was right to keep off from such friendship because to me, such a friendship isn't worth keeping for long.
Yes, sometimes walking away and pretending that person never existed is the best option.