No, King David was not a priest. The priests were from the tribe of Levi. David was from Judah.
When David sent for the ephod to inquire of the LORD, he asked Abiathar the high priest to bring it. Presumably the inquiry was through Abiathar, if the precedent of the instruction given to Joshua, the successor to Moses, was relevant. Joshua was told to inquire of the Lord through the high priest. Numbers 27:21:
And he [Joshua] shall stand before Eleazar the priest, who shall inquire for him by the judgment of the Urim before the LORD. At his word they shall go out, and at his word they shall come in, both he and all the people of Israel with him, the whole congregation.”
The Urim and Thummim were in the breastpiece of the high priest which was attached to the priest’s ephod. (Exodus 28:25) The breastpiece was folded in half to form a pocket to hold the Urim and Thummim. The Urim and Thummim were probably stones, which possibly glowed to give the answer of God to the inquiry of the priest.
David was not the only one to send for the ephod or the Urim & Thummim to inquire of the LORD. King Saul also enquired of the LORD via the Urim & Thummim. (1 Samuel 14:41)
It was a seriously wrong thing to take the responsibilities of a priest to oneself, under the law of Moses. We see examples of this in the following incidents:
- King Saul offering the burnt offering and the peace offering which he should have left for Samuel the priest to offer. Samuel told him he had done foolishly and had not kept the command of the LORD. 1 Sam 13:9-13
So Saul said, “Bring the burnt offering here to me, and the peace offerings.” And he offered the burnt offering. (10) As soon as he had finished offering the burnt offering, behold, Samuel came. And Saul went out to meet him and greet him. (11) Samuel said, “What have you done?” And Saul said, “When I saw that the people were scattering from me, and that you did not come within the days appointed, and that the Philistines had mustered at Michmash, (12) I said, ‘Now the Philistines will come down against me at Gilgal, and I have not sought the favor of the LORD.’ So I forced myself, and offered the burnt offering.” (13) And Samuel said to Saul, “You have done foolishly. You have not kept the command of the LORD your God, with which he commanded you. For then the LORD would have established your kingdom over Israel forever.
- King Uzziah took it upon himself to burn incense on the incense alter and was struck by God with leprosy in the forehead for doing so. 2 Chron 26:16-20:
But when he was strong, he grew proud, to his destruction. For he was unfaithful to the LORD his God and entered the temple of the LORD to burn incense on the altar of incense. (17) But Azariah the priest went in after him, with eighty priests of the LORD who were men of valor, (18) and they withstood King Uzziah and said to him, “It is not for you, Uzziah, to burn incense to the LORD, but for the priests, the sons of Aaron, who are consecrated to burn incense. Go out of the sanctuary, for you have done wrong, and it will bring you no honor from the LORD God.” (19) Then Uzziah was angry. Now he had a censer in his hand to burn incense, and when he became angry with the priests, leprosy broke out on his forehead in the presence of the priests in the house of the LORD, by the altar of incense. (20) And Azariah the chief priest and all the priests looked at him, and behold, he was leprous in his forehead! And they rushed him out quickly, and he himself hurried to go out, because the LORD had struck him.
Hebrew 5 and 7 speak of the priesthood of Melchizedek the priest/king. These chapters in Hebrews point out the likenesses between the roles of Melchizedek and Jesus. Hebrews 7 makes it very clear that priests do not come from the tribe of Judah, the tribe David was from. Hebrews 7:11-18:
Now if perfection had been attainable through the Levitical priesthood (for under it the people received the law), what further need would there have been for another priest to arise after the order of Melchizedek, rather than one named after the order of Aaron? (12) For when there is a change in the priesthood, there is necessarily a change in the law as well. (13) For the one of whom these things are spoken belonged to another tribe, from which no one has ever served at the altar. (14) For it is evident that our Lord was descended from Judah, and in connection with that tribe Moses said nothing about priests. (15) This becomes even more evident when another priest arises in the likeness of Melchizedek, (16) who has become a priest, not on the basis of a legal requirement concerning bodily descent, but by the power of an indestructible life. (17) For it is witnessed of him, “You are a priest forever, after the order of Melchizedek.” (18) For on the one hand, a former commandment is set aside because of its weakness and uselessness