"With their staves (or staffs)" in Numbers 21:18, בְּמִשְׁעֲנֹתָם, "b'mish'antom" is from the noun מַשְׁעֵנָה, "mash'einoh", Strong's Hebrew 4938. The BDB indicates that this is the feminine form of the preceding entry in BDB, מִשְׁעָן, "mish'an", support or staff (Source: Biblehub)
It appears the use of a staff or stave was figurative for support of the princes and nobles who made the digging of the well possible. This is another circumstance where the English literal mindset blinds us to the poetic and metaphorical Eastern meanings of God's word.
There is some difficulty in the English translation in Num. 21:17, due most probably to the mix of all the place names. The emphasis is on the water, the well which was most welcome after 38 years of wandering the wilderness desert.
If we go back to vs. 16 and read this through to the end of the quote in vs. 18 it has better context.
"16 And from thence [they journeyed] to Beer; it [is] the well [concerning] which Jehovah said to Moses, `Gather the people, and I give to them -- water.'
17 Then singeth Israel this song, concerning the well -- they have answered to it:
18 `A well -- digged it have princes, Prepared it have nobles of the people, With the lawgiver, with their staves.'..." (YLT)
Clarke's Commentary believes vs. 18 best understood as:
"The princes digged the well - with their staves - This is not easily understood. Who can suppose that the princes dug this well with their staves? And is there any other idea conveyed by our translation? The word חפרו chapharu, which is translated they digged, should be rendered they searched out, which is a frequent meaning of the root; and במשענתם bemishanotham, which we render with their staves, should be translated on their borders or confines, from the root שען shaan, to lie along. With these corrections the whole song may be read thus: -
Spring up, O well! Answer ye to it.
The well, the princes searched it out.
The nobles of the people have digged it.
By a decree, upon their own borders
This is the whole of the quotation from what is called the book of the wars of the Lord. But see Dr. Kennicott's remarks at the end of this chapter." Source: here
Dr. Kennicott's notes at the end of Clarke's comments on chap. 21 includes:
"The Israelites had spent no less than thirty-eight years in coming from Kadesh-Barnea to their encampment north of Zared. Here, at this fortieth station, they were commanded to pass through Moab by ער Ar, the chief city; but were not to stop till they came to the valley on the south of Arnon. At this last station but one they probably continued no longer than was necessary for sending messengers to Sihon, king of the Amorites, at Heshbon, and receiving his answer. They then crossed the Arnon; and having vanquished Sihon and Og, took possession of the forty-second and last encampment.
"This one chapter has three pieces of poetry, either fragments or complete; and poetry, seldom found in a historical narrative, may be here accounted for from the exuberance of joy which must have affected these wearied travelers, when arriving thus happily near their journey's end. What occurs first is in Numbers 21:14; and has often been called the fragment of an old Amorite song. But it may have been Amorite or Moabite, or either or neither, for the subject matter of it, as it is generally understood, if indeed it can be said to be understood at all. The words את והב בסופה ואת הנחלים ארנון, usually supposed to contain this fragment, do not signify, as in our English version, What he did in the Red Sea, and in the brooks of Arnon. Without enumerating the many interpretations given by others, I shall offer a new one, which seems to make good sense, and a sense very pertinent.
"Observe first, that there must have been a place called Suph, near the conflux of the Arnon and Jordan; because Moses, whilst in that last station, begins Deuteronomy with saying, he was on this side (i. e., east) of Jordan, over against Suph. By this word is not here meant the Red Sea; partly, because that has every where else the word for sea before it, and partly, because of the great distance of the Red Sea now from Moses. The single word, therefore, signifies here some place in itself obscure, because no where mentioned but in these two passages. And yet we cannot wonder that Moses should mention it twice, as the word Suph, introduced in speaking of the two last encampments, recalled to mind the Sea of Suph, so glorious to Israel, near the beginning of their march towards Canaan.
"Moses had now led Israel from the Red Sea to the river Arnon, through many dreadful dangers, partly from hostile nations, partly from themselves; such dangers as no other people ever experienced, and such as no people could have surmounted, without the signal favor of the Almighty. And here, just before the battles with Sihon and Og, he reminds them of Pharaoh, etc.; and he asserts, that in the history of the wars it shall be recorded that Jehovah, who had triumphantly brought Israel through the Sea of Suph, near Egypt, at first, had now conducted him to Suph, near Arnon; that
Jehovah went with him to Suph,
And he came to the streams of Arnon.
"This version removes the difficulties urged by Hobbes, page 266, fol. 1750; by Spinoza, page 108, 4th., 1670; and retailed in a deistical pamphlet called The Doubts of the Infidels, page 4, 8vo., 1781.
"The general meaning of the next piece of poetry seems to be this: that at some distance from the city of Ar, by which the Israelites were to pass, ( Deuteronomy 2:18;), they came to A Well of uncommon size and magnificence, which seems to have been sought out, built up, and adorned for the public, by the rulers of Moab. And it is no wonder that, on their arrival at such a well, they should look upon it as a blessing from Heaven, and speak of it as a new miracle in their favor." (Source: Ibid)
The importance of the water God gave them is referring to the Water of Life, which is found in Christ Jesus.
"But whosoever drinketh of the water that I shall give him shall never thirst; but the water that I shall give him shall be in him a well of water springing up into everlasting life." (KJV)
(All bold emphasis is mine.)