If you read a bit further on, you see that this particular group of Nephites--known as the Ammonites after Ammon, who converted them to the Gospel--was exceptional. The Ammonites made this covenant to bury their weapons and never take them up again as part of their repentance for past sins before they accepted the gospel, and the rest of the Nephite nation was a lot more pragmatic on the subject of weapons, warfare, and self-defense.
The Ammonites were given land to settle on in an area that was well behind the border, where Nephite armies could protect them in the case of another war, and because the covenant that they had made kept them from contributing men to the army, they received additional taxes instead. And when the next war finally did break out several years later, and things were going very badly for the Nephites, it got to the point where many of the Ammonites were very seriously considering the possibility of taking up arms to defend themselves. They were urged not to by their spiritual leaders, though, and instead a few thousand of their sons, who had never made the oath to never take up arms due to being either too young or not alive yet when it happened, ended up enlisting instead, and nobody seemed to think that this constituted "breaking the rules" in some way.
Having said that, the law given to Latter-Day Saints in the Doctrine & Covenants regarding war is that it is justifiable to fight in self-defense, but more blessed to choose not to. It can be found in Section 98, verses 23-48. It's fairly long, so I won't quote the whole thing here, but the gist of it is:
- It is always justified to fight back in self-defense, but if "ye bear it patiently and revile not against them, neither seek revenge, ye shall be rewarded," particularly in the case of multiple offenses.
- If a person attacks you, but then sincerely repents and seeks forgiveness, they are to be forgiven, always.
- Neither a person nor a nation is justified in going out to battle against their enemy (offensively, not defensively) except on a direct command by the Lord, and if an enemy comes upon your nation to battle, you should offer peace first, and only go to war when it becomes clear that they are not looking for a peaceful resolution.
- Even when you are in the process of making war upon them, if an enemy repents of their sins against you and seeks peace, you are to forgive them and accept their offer of peace.
As for the personal ownership of weapons, this is a highly contentious political issue in the United States and various other places in the world. As far as I know, the LDS church does not have any doctrine on the subject either way.