After a party of marauding Amalekites had invaded Negev & Ziklag taking David's people hostage. David asks Abiather to bring the ephod so that they may inquired from God.Its not clear who actually wore the ephod here
1 Samuel 30:7 KJV
7 And David said to Abiathar the priest, Ahimelech's son, I pray thee, bring me hither the ephod. And Abiathar brought thither the ephod to David. 8 And David inquired at the LORD, saying, Shall I pursue after this troop? shall I overtake them? And he answered him, Pursue: for thou shalt surely overtake them, and without fail recover all.
But according to God's instruction it was the priesthood who were supposed to wear the ephod & inquire from the Lord
Exodus 28:26 KJV
26 And thou shalt make two rings of gold, and thou shalt put them upon the two ends of the breastplate in the border thereof, which is in the side of the ephod inward. 27 And two other rings of gold thou shalt make, and shalt put them on the two sides of the ephod underneath, toward the forepart thereof, over against the other coupling thereof, above the curious girdle of the ephod. 28 And they shall bind the breastplate by the rings thereof unto the rings of the ephod with a lace of blue, that it may be above the curious girdle of the ephod, and that the breastplate be not loosed from the ephod. 29 And Aaron shall bear the names of the children of Israel in the breastplate of judgment upon his heart, when he goeth in unto the holy place, for a memorial before the LORD continually
Again in the book of Samuel; it is reiterated that the ephod belonged to the Levites.
1 Samuel 2:27 KJV
27 And there came a man of God unto Eli, and said unto him, Thus saith the LORD, Did I plainly appear unto the house of thy father, when they were in Egypt in Pharaoh's house? 28 And did I choose him out of all the tribes of Israel to be my priest, to offer upon mine altar, to burn incense, to wear an ephod before me?
But here its not clear who actually wore the ephod
Was it Abiather or David who wore the ephod?