Reply to "'I wish' + which form of 'can' to refer to the past"

Thanks to Chuncan Feng for the comprehensive answer. Chuncan Feng is correct in saying that "be able to" is used for past ability:

"I wish I had been able to drive a car then"

I should add, however, that if the verb "drive" refers to a skill or ability, or to the possibility of performing the action, the idea can be expressed with "could have." Note these examples:

"” I wish I could have heard your performance, but I had to be out of town that night

"” I wish I could have understood the situation better, but I didn't have all the facts at that time

"” I wish I could have played the tuba in elementary school but I wasn't big enough

"” I wish I could have driven a car when I applied for employment, because that kind of job paid more

The meaning of ability is further illustrated if we change the indefinite article to the definite article:

"” I wish my friend Anita could have driven the car when I had to go to the emergency room, but she had never learned