Constricting one's anus can work as a polygraph countermeasure provided that it is done timely with the asking of the "control" questions. This countermeasure so concerns polygraph operators that all federal polygraphers are required to use a seat pad that purports to detect such activity.
Alternative countermeasures include mental activity (such as thinking exciting thoughts, or doing math in one's head) and tongue-biting.
For more on polygraph countermeasures, see Chapter 4 of The Lie Behind the Lie Detector: