`I wish I could do it.` is to regret about something you can't do in the present. `I wish I could have done that.` is to regret about something you weren't able to do in the past.