A Londonderry councillor has apologised for giving a court reference for an Irish soldier who was jailed for rape.