Answers are for North American English.
I can’t afford that computer. (most natural)
I can’t afford to buy that computer. (natural)
I can’t afford to buy that computer for myself. (natural)
I can’t afford to buy myself that computer. (natural)
I can’t afford __MY___ buying that computer. (Correct, but somewhat unnatural in North America. “... my buying" a possessive gerund phrase.)
I can’t afford _____ buying that computer. (Correct, but somewhat uncommon in North American English. “... buying ..." is a gerund phrase)
I can’t afford ____ buying that computer for myself. (Correct, but somewhat uncommon in North American English. “... buying ..." is a gerund phrase)
I can’t afford ____ buying myself that computer. (Correct, but somewhat uncommon in North American English. “... buying ..." is a gerund phrase.)
I can’t afford __MYSELF__ buying that computer. (Wrong in North American English. I can’t comment on British or Australian English.)