Which relays are guard relays is public knowledge (by necessity, it's how clients know which hops to select). If you operate a middle relay, and you see traffic coming from a relay not known to be a guard, you know it's from a non-standard Tor config, since you should only see circuits being built through guards (ignoring onion service traffic, which is small enough that we can do so in the limit). If you mean "get your relay listed as a guard, but don't accept traffic from anyone else", 1. you're going to lose your guard flag pretty quickly trying that, and 2. you ultimately have the same problem, since the adversarial middle will see that this guard is relaying suspiciously little traffic (relays only get flagged by auths as guards if they can handle above a certain amount of traffic, since they are designed to change infrequently, so a bad one will give you a bad Tor experience for a long time).