I've seen this principle come up a few times but I don't think I fully understand it. For example, assuming a passage in a story where a protagonist enters person X's house and a particular room is described in much detail. The described detail does not necessarily advance the story but instead does "character building" hinting at the personality of person X. There literally could be a loaded gun hanging on the wall…
Yes. If the gun doesn't appear anywhere after its first mention, then it should not have been described. This is quite literally what Chekhov says, and I think he's right.
It works the other way too. In order for a gun to be used in a story, it has to have been alluded to before. A character cannot suddenly find a gun in their hand and use it in any significant manner. If they do, the audience will feel cheated and be upset. But avoiding this pitfall is super easy, all one has to do is just present the gun a few moments before it is needed.
It the final scene of "Sea of love" (1989), Pacino's character overpowers the bad guy with an object he finds under the bed. This object has been shown to the audience before. If it hadn't, the scene would not have worked.
Of course, rules exist to be broken... but do so at your own risk.