No, you don't have to play the root.
But, in most cases, you have to play something that works well with both the chord and the melody. Often times, that is the root.
Also, the root is called that for a reason. Think about the word root. A root firmly attaches a plant to the ground. A root note firmly establishes a chord and the melody within it. So if the bass isn't nailing the root, find a way for somebody to be doing it other than just buried in a guitar chord.
So, sure, stray away from the root to mix it up a little. But avoiding the root constantly just to be cool and different could cause the song to suffer. When you start trying this, record the whole band a lot. Listen to the WHOLE song, and not just your kick A new root-avoiding bass line.

You still need a song when it's all said and done. And each part needs to contribute to the song, not detract from it.
In short, it's kind if like slap bass.....and chili powder. Sure, it can sound/taste good. But it's also really easy to put in too much if a good thing.