You cannot legally force someone to conceal their resignation from the rest of the team, but you may come to an informal agreement that they’ll keep it quiet while working their notice.
Some employers feel that knowing someone is leaving can affect morale, while others think it’s best to be transparent with their workers. It’s entirely up to you.