You can hurt yourself doing anything. Nobody says to consult a doctor before doing anything else, but there's lots of fear mongering around exercise. Going from sitting at a desk all day to doing some weightless squats, curling tiny weights, and bench pressing a bar isn't going to ruin your body. It's only risky if you're physically disabled and already know it.
I even see people saying you should see a doctor before you start walking or jogging. No. Start slow, and if it majorly hurts your bones and joints, then talk to a doctor because you may have something wrong. If you just feel a burn in your muscles after a while and an ache in your muscles the next day, you're fine. You're getting stronger.