Ephod is used in this context as a shorthand designation for the breastplate of the high priest that contained the Urim and the Thummim. The breastplate was attached to the ephod (garment) of the high priest (Exodus 28:4–14).1 Though not always stated, we should assume that the practice of inquiring from the Lord was a regular operating protocol of David throughout his reign as king.
6 When Abiathar the son of Ahimelech had fled to David to Keilah, he had come down with an ephod in his hand.