Yes. It's a developed skill. Like all skills, it takes practice. For example, I found I got a lot better at just focusing on sensation through biking. A thing to understand - bikes have an amazing tendency to follow your eyes. When on a narrow trail, if you fixate on the trees by the side, you'll have an annoying tendency to hit them, but if you just keep your eyes scanning the trail, your body will follow.
I wanted to practice this skill (plus my balance) so I set up an obstacle course for myself. Basically, just some boards (4 to 8 inches wide) laid across cinderblocks/stacked tires lengthwise. I laid the boards so there were steep inclines/declines /\/\ and some funny angles involved.
If you attempt this with your mind wandering around, you're not going to do well and you'll fall off the side. If you fixate on the fall on the side, that's where you'll go. If you fixate on the gaps between boards, you'll go off at funny angles and probably fall. This activity FORCES you to pay attention to the feel of your feet on the peddles, visual input, arm position, all while focusing on the board you're riding. Every time I rolled up to the first board, I'd be sure to hit that "off switch."
After a solid week or so I was able to cross on all 4 inch boards, with rapid /\/\, at a moderate slow pace (harder to balance). It was also cemented into my mind: keep your eyes scanning over the trail you want to cross.
I don't have my MTB anymore