Microstrip lines

Is it necessary to account for solder masks when determining the effective dielectric constant for microstrip lines?

Yes, it is. If you don’t, your dielectric constant will change.