I showed the difference in nuances bellow.
その瞬間に自分の手にXが握られている: X would being held by my hand that time.
その瞬間の自分の手にXが握られている: X is held by my that-timed hand.
From the former, I feel a little strange ...
The の is normal of.
You can use に as well.
are both fine, literally corresponding to
X is held by my hand of that moment.
X is held by my hand in that moment....