I would not interpret 2Sam.6:18, or comparable text like 1Ki.3:4, in a strict and direct sense applicable to David as the direct actor; but only after the sense of 2Chr.29:27, "And Hezekiah commanded to offer the burnt offering upon the altar." As the titular head of the church, and the one who literally led the whole nation in worship, David properly is credited with the sacrifices, the apotheosis of what would be said of an average person bringing his sacrifice to the Tabernacle or Temple: that he made him and his family to sacrifice a burnt offering through the ministry of his priest. Num.10:10 describes such things as "your sacrifices" meaning the people's, (or Dt.12:6, etc.). Ps.4:5 commands, "Offer the sacrifices of righteousness, and put your trust in the Lord." This direction does not authorize personal altars.
David seeks from the priesthood time and again for their ministry to himself and the nation, which he needn't have done if he was entitled by an extraordinary dispensation or other expectation that he and his sons should serve as priests. King Uzziah was struck with leprosy for arrogating to himself the office of priestly sacrifice (of incense), 2Chr.26:16ff.
David himself seems to anticipate a greater sense than any he could himself hint at, for combining the offices of king and priest when by inspiration he conceives of a future priest "according to the order of Melchizedek," Ps.110:4. This his son, who shall also be so great as to command his obeisance, will be a true priest, not needing to invoke the presence of another authorized to do that work (as David understood of himself). Indeed, the separation of a priesthood from Levi, and the distinct tribe and family to which was given the monarchy (Gen.49:10) speaks clearly to the propriety of maintaining such a signal dispersion of these two callings within the nation until the time came to properly combine them.
Yet, David's leading the people in worship and sacrifice does hint at that eventual combination. But there are other biblical figures who bring the two offices quite close together, tighter even than David. Prior to the national instantiation and a division of offices, the patriarchs all demonstrate a combination of judging authority, leading worship by sacrifice, and proclamation of the word. Naturally, some vestiges remain of this office-bearing for every father in Israel. Among the judges of Israel, Samuel stands out as one who brought together both judgeship and a priestly affect, which we may tie both to his Levite heritage and his from-birth association with (we might almost say adoption by) Eli the high priest.
But Moses--alone of national Israelite figures--being the mediator of the Old Covenant, is the one back to whom a figure like Samuel reminds the believing Israelite, both whom point ahead to (not David) but the Christ, mediator of a better covenant. Moses was the end of the patriarch-era, and the start of the national existence. He was the great prophet, a priest (making sacrifice himself before and beside Aaron), and a king (or judge) of the whole nation. It would require one greater than Moses to eclipse him, and to obtain all three offices.