A man who I gave a lift to - would not work without to?
Though the versions with to are far more common, relative clauses and reduced relative clauses (where the that, who or whom etc is elided) may be used with or without the preposition to, corresponding to both variants of this 'dative transformation' (using this term as a syntactic label rather than examining the nature of giving) :
'A 59-year-old accused of raping a woman he gave a lift to has been ...'
'I know of one woman he gave a lift home from rural areas ...'
'The board also concluded his remarks to the boy he gave a lift “certainly appears to be ... " ' (all Google).
ALSO, one cannot simply say that 'a verb undergoes / does not undergo the dative transformation':
Give with its normal meaning certainly enters ditransitive constructions:
He gave a heavy parcel to the woman.
He gave the woman a heavy parcel. [ditransitive version]
So does take:
He took a selection of magazines to his friend in hospital.
He took his friend a selection of magazines.
Even[Even here, He took his friend in hospital a selection of magazines sounds unnaturalclumsy.]
With different senses, perhaps involving more fossilised constructions, one or other of the alternatives may not be considered grammatical:
He gave her a withering look. [gave is used delexically here]
*He gave a withering look to her.
*He took the party a couple of bottles of wine. [took is used in the sense took along here]
He took a couple of bottles of wine to the party.