In 3 Nephi 18 the disciples were taught the sacrament ordinance and they all partook of the bread and the disciples were given the power to confer the Holy Ghost. How could that happen when they were baptized in Chapter 19?
The Nephite disciples were baptized in 3 Nephi 19, but they were probably baptized before the book even opens! Take a look at 3 Ne 1:23, “And it came to pass that Nephi went forth among the people,” – this is the same Nephi who’s called to be a disciple – “baptizing unto repentance”. So you’ll be pleased to know that they partook of the sacrament and given priesthood authority after they had already been baptized. But now I’m afraid I’ve muddied the water.
If they were already baptized, why were they baptized again? If they already had priesthood authority, why was the authority given again? The key to these questions is dispensationalism. With the resurrection of Christ came a fulfilling of the Law. That chapter was closed and a new one was opened. Christ organized the Church of the New Covenant, granting the authority to administer the sacrament (a new ordinance), as well as the authority to give the gift of the Holy Ghost (which includes entrance to the new church). So Nephi is already “worthy” to partake of the sacrament in chapter 18, and later he is baptized into the newly-formed church of the new dispensation.