Often my teacher tells me to avoid practicing with pedaling so that my melodies/slurred passages will truly be legato. When I perform for him though, he asks me to use the pedal, which I'm usually pretty unprepared for so I use too much or too little. How do you suggest practicing pedaling without becoming dependent on it for a legato sound?
It really depends on the genre you are playing. I'll go through two with you.
"Classical": In many books the pedal points are notated. If they are not notated then it depends on the period that the song was written in. I titled this section "classical" because that's what people usually think when they hear Bach and Beethoven. The proper term is "Western Art Music", but I digress. In the Baroque period (1600-1750), they didn't have pianos so don't use pedal here. During the classical period (1750-1820) pedal is acceptable, but should not be used too much. Pedal every chord in every section would be too much. Think of pedal as a last resort if you're unable to connect something in a legato style. For the romantic period and onward, you may use the pedal freely if you feel the piece calls for it. Obviously, this is a gross generalization. A good way to see if use of the pedal is correct is to listen to recordings of whatever piece you're working on. Professionals do tend to break rules and things like that so perhaps you should listen to a few recordings.
Pop music: In pop music I use pedal almost non-stop. Change the pedal when the chord changes. If you are adding non chord notes (in the RH) you do not and should not pedal for each note. Sometimes if things get a little too murky then I will partially let off the pedal, but not fully because that would cause a break in the flow of music.
Overall: If using the pedal makes your playing more musical then use it. Your ears are always the final judge :)
It doesn't make much sense to me to perform something for your teacher what you haven't practiced. So if you haven't started using the pedal for a particular piece yet (for whatever reason), tell him so and ask to perform without pedal.
If you teacher suggests you practice without pedal (at all / most of the time / only when starting a new piece / until you can play properly without pedal?), he should be OK with this. If he insists you use the pedal for every piece when performing for him, ask him again about when exactly you should use the pedal during practicing.
The proper use of pedal is a major aspect in the art of piano playing and your teacher should guide you trough it.
In hard lines, we use the pedal not only to connect notes, but also to alterate the colour of the sound.A simple example is when in the left hand you have an arpeggio (pedaled) and then the same hand begins to sing the melody, where you play it clear without the pedal, to emphasize the difference.
Generally, regarding the press/release moment of the pedal, there are three ways of pedaling.
Besides that, pedaling has degrees (mainly the hole pedal, half pedal, 1/4 and then you go for more fine pressing values) which also produce various effects; ie, there is a point of pressure about half the pedal, depending on the piano, where only the bass registry is sustained, whereas the treble one sounds clearly, so you don't mess up the melody while the armony sounds in a deeper level.
Overall, pedaling, especially insecure pedaling, may cause loss of balance which leads to tension, which leads to injuries and dissapoint, and we all play the piano for the joy of the journey in the conquest of the making of the sound... Unfortunately, that's note the mainstream concept when it comes to teaching, and by my personal experience, one has to strive to find a proper teaching...
The difficult but well rewarded path to find your way in piano playing, regardles the ability of your teacher in transmission of fundamental knowledge but depenting on your devotion to make music on the piano, is to constantly experiment. Learn a few thing about the subject in matter through endless on and offline sources, and then sit on the piano and play out around whatever you've learned, on a simple, small melody line or chords progression... By the way, the majority of what I wrote about pedaling, is from my understanding and experiments on the wrotes of Heinrich Neuhaus in "The art of piano playing".
Have a nice piano journey! 😊