Yes. You can do it with an electronic keyboard. Many of them have weighted keys these days, so it is much more like playing an actual piano that in used to be. It isn't EXACTLY the same... but it is close enough for just starting out.
My daughter has taken lessons (started in 2nd grade) and she uses a Casio 60-some odd number of keys keyboard. It cost about $200, and after she was taking lessons for about 1 1/2 years, I added a pedal. (check before you buy, but most keyboards allow you to add sustain pedals to them, not all, but most... online, they are about $20, when your kid is ready for it). She has had the keyboard in the rarely used living room, in her bedroom, and now it is in the family room against a wall. Good sound. Perfect for what she needs for practicing.
She plays the organ at church on Sundays, too. So she gets regular practice with actual ivories... :)