I’m afraid this is a myth which is perpetuated in the NIV Study Bible notes on Exodus 28:35. The notes say
According to Jewish tradition, one end of a length of rope was tied to the high priest’s ankle and the other end remained outside the tabernacle. If the bells on his robe stopped tinkling while he was in the Holy Place, the assumption that he had died could be tested by pulling gently on the rope.
But you can’t always believe the notes in your Bible. This myth appears to have originated with the 13th century A.D. Jewish work, the Zohar:
A knot of rope of gold hangs from his leg, from fear perhaps he would die in the holy of holies, and they would need to pull him out with this rope.
There is no evidence in any ancient source that this is true. Besides, Leviticus 16:3-4 gives clear instructions about what the high priest should wear, and it did not include a rope.
There is a helpful discussion of the myth at the BiblePlaces blog (from which the above information was obtained).