Yes, lice can survive off the body. But not for long.
Head lice are human parasites. That means they live on human blood. In fact, you can see the blood when you look at lice pictures or a louse with your naked eye (kind of like the belly full of your blood you see in a mosquito just after it takes off from your arm).
Head lice prefer to spend the 40 or so days of their life (see lice life cycle) on a single host. They like living in a warm, humid environment and close to a blood source where they can feed every few hours and lay their eggs. A human head with its insulating layer of hair is the perfect place for that. They were born there, and will most likely die there.
It is possible for a head louse to get knocked off a head, though. If that happens and it doesn’t find another host within 24-48 hours, it will die. But if it lands on a hat or brush that gets picked up by another person, a healthy louse is happy to latch onto hair and climb down to the scalp to make a new home.