"Cast me not away from Your presence; and take not Your holy spirit from me." Psalms 51:11 "(51:13) <<
The Midrash says,
Whoever teaches the Torah in public partakes of the Holy Spirit (Cant. R. i. 9, end; comp. Lev. R. xxxv. 7).
Rabbi Phinehas ben Yair said:
Holiness leads to humility; humility leads to the fear of sin, the fear of sin leads to saintliness; saintliness leads to the Holy Spirit.'
Tan. Wayechi, 14 says,
The pious act through the Holy Spirit.
These sources thus make it clear that one can have Ruach ha-Qodesh (the Holy Spirit or the spirit of holiness) as David had.
Bibliography: Jewish Encyclopedia, 'HOLY SPİRİT'.