‘And when he had said these words, the Spirit of the Lord was upon him, and he said: Helam, I baptize thee, having authority from the Almighty God, as a testimony that ye have entered into a covenant to serve him until you are dead as to the mortal body; and may the Spirit of the Lord be poured out upon you; and may he grant unto you eternal life, through the redemption of Christ, whom he has prepared from the foundation of the world’ [ Mosiah 18:13].
If he had authority to baptize that is evidence that he had been baptized. Therefore, when Alma baptized himself with Helam that was not a case of Alma baptizing himself, but merely as a token to the Lord of his humility and full repentance.
(Joseph Fielding Smith, Answers to Gospel Questions, 3:203)