If he sees a benefit in that, yes. Al-Bukhari, may Allah have mercy on him, even dedicated a chapter to this.
And Ali ibn Abi Talib says: You might tell people something their minds cannot grasp, and it could be a trial for some of them.
And he says: Speak to people according to what they understand. Do you want Allah to be denied?
And His Messenger, Ibn Mas'ud says. So the point is, yes, a person may withhold some knowledge for a benefit, as was reported from Abu Huraira.
May Allah be pleased with him, he says: I memorized two vessels of knowledge from the Messenger of Allah ﷺ.
As for the first, I have shared it. As for the second, if I were to share it, my throat would be cut.
They said that what he conveyed was related to rulings and other matters.
And what he did not convey was related to news about what would happen in the future.
Out of fear of fitna, among them is that Abu Huraira used to say: O Allah, do not let me reach the year sixty and the rule of the children.
Meaning, he says: O Allah, do not let me reach the rule of the year sixty and the rule of
the children. He expected this, he was informed of it by the Prophet ﷺ, so apparently, yes, it is permissible.
For a person to conceal some knowledge out of fear of fitna, but not knowledge that rulings depend on, rather knowledge that is only related to news.
Is that clear?
Yes, knowledge, knowledge that does not involve rulings, there is no halal or haram, I do not let a person fall into haram and then hide it or stay silent, but news, just information, that is allowed.