it would be possible to achieve this, by using the access permission preferences within the TeamViewer application of the Server.
Please open the options via Extras--Options--Advanced
If you edit the "Advanced settings for connections to this computer" to only allow "Connect and view screen" after confirmation, it will only be possible to connect to an active session if the active user allows this.
Please also tick the options "Full access control when partner is connecting to the Windows logon screen " so you or any other person will be able to reach the Server if no one is actively working on it. Please bear in mind, if you should leave the Server without locking the session at the end, you or anyone else will not be able to reconnect because "Connect and view screen" would need to be confirmed.