A Machmeter doesn't use the true airspeed (TAS) or the local speed of sound for its readings since the TAS measurement can't be obtained without getting the Mach number first.
The calibrated airspeed (CAS) shown to the pilot is also used by the Machmeter, it measures the speed based on the pressure differential between the pitot tube and the static port.
- If $P(pitot)$ $>$ $P(static)$, then the speed reading will be positive.
The bigger the difference, the faster the speed.
- If $P(pitot)$ $<$ $P(static)$, then the speed will read zero since the speed indicator doesn't allow negative speeds.
A blocked static in a climb will cause (2.), and it would require an extremely fast flying to get the gauge to show any speed reading above zero, probably even faster than the plane can handle.
The blocked static will also freeze the altimeter and show zero vertical speed. Glossing over how such a climb can be maintained, let's assume there are different pitot-static sources, one for flying and one for the Machmeter.
After the static-port is blocked in a climb, the Machmeter will within minutes (or seconds if it's a fast climb) drop to zero, just like its CAS reading.
Aircraft flight instruments use pressure differential, not temperature, to compute the Mach number.
The true airspeed is calculated by the Air Data Computer from the Mach number and the outside air temperature.
— Is the Mach number shown by an Air Data Computer considered a "true" Mach number?
As you can see, it is the Mach number that is used to know the TAS, not the other way around.
Pre climb and blocking.
Blocked, then climbed at same speed.