It was the Witch-King (Probably)
Two of the figures halted. The third was taller than the others: his
hair was long and gleaming and on his helm was a crown. In one hand
he held a long sword, and in the other a knife; both the knife and the
hand that held it glowed with a pale light. He sprang forward and
bore down on Frodo.
At that moment Frodo threw himself forward on the ground, and he heard
himself crying aloud: O Elbereth! Gilthoniel! At the same time he
struck at the feet of his enemy. A shrill cry rang out in the night;
and he felt a pain like a dart of poisoned ice pierce his left
shoulder.
Theoretically it could have been from another of the Nazgûl (we don't see the actual strike) but the implication is very clear.
In the Peter Jackson film adaptation, the event is rather clearer
IN THE TWILIGHT WORLD:
Frodo finds himself in the weird twilight world...he looks upon the
Ringwraiths, now visible in their TRUE APPEARANCE: Five Ghouls dressed
in long Grey robes, with white hair, and Pallid, ruthless faces. THE
WITCH KING extends a haggard hand towards Frodo, reaching for the ring
on his finger. Frodo's trembling hand extends forward as if by the
pull of the ring...he slides to the ground, unable to pull his hand
away. The witch king snarls and springs forward. He stabs at Frodo
with a wicked dagger! Frodo winces as the tip of the dagger sinks into
his shoulder. Suddenly, Strider charges at the RINGWRAITHS, wielding
his sword in one hand, a flaming torch in the other. He moves in slow
motion, visible through a sea of mist. Frodo sinks to the ground.
Behind him is a faint image of a Ringwraith fleeing, his head engulfed
in flames. With draining strength, Frodo manages to pull the ring off
his finger...
LOTR: Fellowship of the Ring - Original Script

And again in the Ralph Bakshi adaptation of Lord of the Rings, he's quite definitely stabbed by a character later identified as the Witch-King.
