Yes, somebody can be speaking under the influence of the Holy Spirit, without knowing that God is speaking through them.
Then one of them, named Caiaphas, who was high priest that year, spoke up, “You know nothing at all! You do not realize that it is better for you that one man die for the people than that the whole nation perish.”
He did not say this on his own, but as high priest that year he prophesied that Jesus would die for the Jewish nation, and not only for that nation but also for the scattered children of God, to bring them together and make them one.
So from that day on they plotted to take his life. John 11:49-53 (NIV)