Sure, but "at the yard" works as well, albeit the meaning is a little bit different.
- at the yard: You're at the edge of the yard. Could be next to the fence of the yard (inside or outside).
- in the yard: You're definitely inside the yard.
I admit that I could have explained it more clearly before, but even though the sentence may sound strange to you, it's still a normal English sentence (in American English).