Short answer: No, you do not need to be a web developer to learn Web3.
Long answer: As long as you have the fundamentals of programming nailed, whether, through python, java, or some other backend languages, you are more likely suited to be a Smart Contract Developer or potentially a Protocol Engineer.
Now, if you know web development or full-stack development, you are in a better position to be a Decentralized Application or Dapp developer. The reason why is because building a decentralized application requires building both the frontend and the backend (smart contract), but you could also just build frontend with existing smart contracts or the Hyperverse.
In essence, don't let the fact that you don't know web development deter you from pursuing a career in Web3. There are many different types of engineers that all require unique talent stacks.
I recommend looking at potential jobs you want and looking at their requirements. See what skills you are lacking and work on those specifically. This will give you an advantage when applying and give you a better idea of what you need to know to be a certain type of engineer.