Consider that the cadence might be an authentic cadence, but not a perfect authentic cadence. (I'm not sure which terminology your text is using, but "perfect" is often used as a synonym for the broader category of authentic cadences.)
Let's think about it: to achieve a perfect authentic cadence without exposed direct fifths and/or octaves, the last three notes in the bass would need to be a rising line of F -> G -> C.
So what does the 2nd bass note in the 3rd bar need to be? It could be C (as part of VI6), but that means that you have a falling direct octave between the descant and the bass (A♭/C -> F/F), so that means it must be F.
So what do we need then for the first bass note of the 3rd bar? E♭ (as part of i6) would work, but E♭ below the bass stave is proscribed in this exercise as out of range (as you have stated), and if you hoist everything up an octave to near the top of the stave, you run out of room for the alto and tenor. A♭ might do, but you will have a hidden octave between descant and bass. F then, maybe? In that case the last note of the bass in m.2 must drop to F, forming a direct fifth in the outer voices.
So you have a choice here: trying to figure out the least objectionable direct fifth or octave between the descant and the bass, or using an imperfect authentic cadence. The latter has the advantage of actually suiting the melody, because the "Scotch snap" D -> C at the end of the melody sounds more like an appoggiatura than a cadence - it rather suggests that something should follow the phrase.
So let's look at this:
Example B is a skeletal harmonisation that would fit the exercise. Example A fills out the example with a number of non-harmonic tones (marked "+") that don't really change the way the part writing is handled. I added them because it is always interesting to see if you can get something musical out of an exercise.
Here the cadence is V6-I, and, as you can see, meeting the constraints becomes possible. There is an augmented second in the bass between bars 3 and 4: that's within the idiom, especially as the bass is arpeggiating a diminished triad (as bracketed in the score). I've marked out the direct fifths and octaves with lines. You'll note that none are exposed; all involve at least one of the inner voices. (Direct octaves and fifths are preferable with one voice moving by step, but that is not always possible in a skeletal harmony exercise. That's part of why I added passing notes to the "artistic" version.)
So I suppose it depends on how broadly or strictly your particular textbook is defining "perfect cadence". Exercises like this often do involve trade-offs, finding the least bad solutions to tricky problems. To my mind, the imperfect cadence is the best solution.
EDIT: Well then, there's nothing for it but to accept an exposed octave or fifth, and also the last tenor note passing below the penultimate bass note, because you probably won't get in the third of the tonic chord any other way. What might be acceptable here is an exposed falling octave in the final cadence, because such do see use in the real world, the falling fifth in the bass being a topos (traditional gesture) of the perfect cadence, thus you get the following possibilities:
I prefer the high bass and accept a bass G higher than the tenor E♭ because dropping F -> G an octave pretty much guarantees either a parallel fifth or a hidden octave between the outer voices, and in a place where such is not traditional. This gives a couple of possibilities for the bass in m.3:
- As per example C, the low F rises an octave, with tenor F moving the third of the subdominant. This is fairly clean.
- As per example D, the bass rises in an arpeggio to F. This creates an additional direct octave and a direct fifth with the alto C (as marked), and causes the bass F on the last beat of m.3 to pass above the E♭ in the tenor on the second beat - a messier solution, but one that might be acceptable in real use for motivic reasons (the bass and tenor having something of a pattern).
Example D also has a tierce de Picardie. That's because I won't be writing any more examples: it's a final cadence.