Yes, you can still play an electric guitar without the electricity but the sound you will hear is acoustic sound. It will still function as a guitar, you can pluck it, strum it, or even play a song with it but will only act like a normal guitar.
When you plug it in electricity, it will produce amplified sound making that unique sound that you expect from an electric guitar. So if you are practicing a solo for a performance in the wee hours of the night, you can do so as long as your electric guitar is not plugged in its amplifier. Then you could amp it up when you perform to a crowd.