A cattle guard is a series of parallel bars set over a depression in the ground. The spaces between the bars is wide enough that an ungulate's hoof could pass through, thus they will avoid walking on it.
You will still need to use a fence (I recommend an invisible one), as this is configured as a path only.