Reading and writing to the same Arduino Pin

You can digitalRead a pin you're also using for digitalWrite but generally the consensus is that you shouldn't need to. If you need to keep track of the state of the pin, you can use flags as mentioned above.

Often in a temperature control scenario though, you turn on a heater when it's too cold and turn it off when it's too hot. In a cold situation, if you set a pin high to turn on your heater on every iteration of loop, no harm done if it was high already so you really may not care whether the heater is currently on, just that it's too cold so you ensure that it is on.