Frodo had been stabbed with a Morgul blade. The tip of the blade had broken off and was making its way to Frodo's heart. It was necessary to remove the tip in order to cure Frodo, so Aragorn had to bring Frodo to Rivendell.
Merry and Eowyn were exposed to the Witch King's Black Breath when they fought him, but they were not stabbed by a Morgul blade. Therefore, Aragorn was able to counter the effect with Athelas.