I just came across your question and am surprised that no one has attempted to answer it yet. I am by no means a scholar of the Hebrew scriptures, but I would like to offer some thoughts.
First, your astute observations underscore an intriguing theme that appears often in the historical books of the Tanakh: the appearance of a figure who is described with the titles or characteristics of God, but also with those of an angel (e.g. Jg 13:3f, esp 13:22 ) or with those of a man (e.g. Gen 18:1-2, Gen 32:24,30 ). Many other examples can be found by doing a search on the "Angel of the Lord".
In fact, quite often when these figures appear, they are referred to as the Lord and his angel interchangeably (e.g., "the Angel of God said....'I am the God of Bethel'." [Gen 31:11,13]).
This pattern is somewhat peculiar and disarming to the reader, particularly when one first encounters it; but it is certainly not uncommon.
There are a plethora of interpretations of this motif, which I won't go into here (though it certainly deserves a question of its own in this forum). Personally I believe it highlights the fact that whenever the infinite God appears to a man, there is necessarily a mediatorial aspect -- one can never see Him "as He is", but only as He reveals Himself (as a burning bush, or as an angel, or as a man, etc). This reminds us of His ineffable glory and unfathomable majesty. At the same time, it also foreshadows and prepares us for the ultimate incarnation of God in the person of Jesus.
That your passage is another example of this motif is more clearly seen when we read past the chapter boundary (which wasn't in the original), noting that the first verse of the next chapter is probably just parenthetical. So then the passage reads:
The captain of the Lord’s host answered Joshua, “Remove your sandals from your feet, for the place where you stand is holy.” And Joshua did so. (Now Jericho was shut up tight because of the Israelites; no one could leave or enter.) The Lord said to Joshua, “See, I will deliver Jericho and her king [and her] warriors into your hands." —Joshua 5:15-6:2 (NJPS)
So, while I agree that this is a somewhat peculiar way for Him to refer to Himself, I think the context (as well as the theophanic allusions that you noted) makes it clear that Joshua's visitor was none other than the Lord God Himself.