So I was practicing the third movement of the K545 Sonata in C major by Mozart, and the tempo was marked Allegretto. And I came to this hard section that I actually played it slower than I should have. Can I do that or shouldn't I?
If you are playing one section slower than the rest because of technical issues: no, you shouldn't do that. Of course you can do it when you practise, but then the goal is to improve it so that you are able to play it all at the same tempo.
It's not that you can never change the tempo, but any change should be controlled, within the style (so in the case of Mozart, minimum) and backed by a musical idea, not by a technical necessity.
If you are trying to prepare a piece for performing, certainly taking a slowed-down look at it is not just "allowed" but advisable so that you can work out its intricacies.
If, on the other hand, you are practising sight-reading corepetition (quite a different skill from prepared solo performing), the speed has to be correct right away, the articulation should be reasonable, and thinning out chords and lines strategically to make stuff work on first try at speed is an important asset.
How do you know you actually played it slower than 'allegretto'? The term is quite vague, as in slower than allegro, which on one of my metronomes is 180 - 150 bpm.So, if you were at, say, 140bpm., then that would be a fair allegretto. Having said that, the tempo mark is there at the behest of the composer, Mozart, who, at the time, felt the need to give a rough, and I mean rough, approximation of the tempo. Maybe, at some points in his performances, he felt like playing it faster or slower - we'll never know.So how does should or shouldn't enter into this? If he was here now, he may be able to help decide. However, he's not - he's finished composing, and probably finished decomposing as well. If you are unhappy that it sounds a little slow, speed it up!
If you really mean, in the question, should I go slower for the tricky bit - which is a different slant - then of course not. Play the whole movement or passage at a tempo that is managable for you.