Microsoft Teams has this option built-in (as described in the official Microsoft documentation). Unfortunately, the documentation also states that as of today:
> Notes:
>
> * For now, Linux users aren't able to use this feature.
> * Background effects won't be available to you if you're using Teams through optimized virtual desktop infrastructure (VDI).
>
So unfortunately, until Microsoft Teams is updated for Linux, if you want to use this feature, you need to either try your luck with a Wine version or pass your camera stream through an external filtering tool (such as OBS).