I'm trying to add a friend in Steam but it doesn't allow me because my friend slots are full. I am trying to delete one of my friends to open a slot but it doesn't work. It gives an error saying that it failed to delete the friend.
I assume your account is limited?
This means you didn't bought something for at least 5$ in the steam market.
You can add no one and other things are limited. If your friend has got an unlimited one he can add you, because with a limited account you are still allowed to accept friend requests.
You can check here what you can do with a limited account and things you can not do.