Yes 16GB DIMMs and 32GB DIMMs can work in the same server.
How many 16GB DIMMs are in the server now and how many 32GB DIMMs are you wanting to add?
See:
https://www.cisco.com/c/dam/en/us/products/collateral/servers-unified-computing/ucs-b-series-blade-servers/b200m4-specsheet.pdf
Be sure to double check existing PID and new PID to make sure the population rules are not broken. See notes immediately after section:
Table 6 2400-MHz DIMM Memory Speeds with Different v4 CPUs
Also see section:
Table 27 Recommended Memory Configurations for Intel Xeon E5-2600 v4 CPUs (with 2400-MHz DIMMs)
There are a few populations detailed on the spec sheets, but not all.
There are also some NOT recommended populations (per Intel).