No, you are not obligated to tell your supervisor whether you are a union member or not.
Union membership is particularly sensitive personal information. That is why membership information is especially carefully protected by the General Data Protection Regulation.
If you observe a data protection violation at your workplace, report it immediately to the regional office.