Is there a word for a measurement process that affects the thing being measured?

This is called the observer effect.

In science, the term observer effect refers to changes that the act of observation will make on a phenomenon being observed. This is often the result of instruments that, by necessity, alter the state of what they measure in some manner. A commonplace example is checking the pressure in an automobile tire; this is difficult to do without letting out some of the air, thus changing the pressure. This effect can be observed in many domains of physics.

(source: Wikipedia)

The observer effect can apply to your second example, as well, though often researchers will lean towards investigating the placebo effect or attempting to eliminate a cognitive bias when they believe that the subject's mental awareness may be a factor in the outcome.

(links: Wikipedia)