If we start with the sentence:
"This is the first time I've touched a dolphin."
Then the correct way to 'rewrite' the sentence is to remain in the present perfect, ie
1a) This is my first time to have touched a dolphin.
2a) This is my first time having touched a dolphin.
Both sentences are grammatical. I greatly prefer 1a. It's hard to imagine saying 2a.
As for your original "rewrites"
1) This is my first time to touch a dolphin.
2) This is my first time touching a dolphin.
I also greatly prefer 1 here.
And neither 1 nor 2 have to be said at the moment of the touch. For example, if one is on a dolphin-spotting boat as part of an activity that lasts several hours, then either 1 and 2 can be said either before or after the actual touch, as part of talking about the entire experience that has (or is) lasting several hours. In addition, 1a can be said anytime after the actual touch. While, again, 2a seems to me unlikely to be said, and almost as unlikely to be written.