I’m operating an ATMega32 at 3v3 through USB and a LDO.
Is it possible to connect the AREF pin directly to the USB voltage of 5V so that I can read voltages between 0 and 5V when reading from the analog pins?
Indeed this information will be in the datasheet, but since it might be difficult to find I'll help a bit:
The datasheet will state that the voltages at the uC's inputs/outputs cannot exceed the voltage on the VDD pins.
The reason for this is the ESD protection diodes. As soon as the voltage at AREF becomes higher than VDD + 0.5 V the AREF's ESD diode will start conducting.
So if you connect 5 V to AREF, the VDD supply of the uC will be pulled up to about 4.4 V ! But you supplied 3.3 V via an LDO. Yes, then the LDO will do nothing.
If you want a 5 V input range either power the uC with 5 V
use a voltage divider to lower the input voltage to the ADC.
To learn more about what issues the ESD diodes can cause, watch this EEVBlog video