With the negative you already have in your sentence (I couldn't afford) you need the positive "anything."
If your sentence were positive (I could afford), then you could use the negative "nothing."
I could afford nothing there.
I could afford almost nothing in that shop.
I couldn't afford anything.
I couldn't afford almost anything.