Limiting where a Turing Machine can write

Suppose I have a Turing Machine A, generated by somebody else, trying to break my system. To break my system they would have to write to the tape at some point X (this can be a range of the tape).

If I can force the machine A to be in some state q1 at some point, can I make a Turing Machine B such that for any Machine A it will never write in X?