Yes. Put the sunglasses on first, then seat the hat where you actually wear it. Keep both items in place while you turn your head and look up and down. You should be able to move naturally without the hat pressing the frames into your temples.
Check the frames at your temples
Compare the fit with and without sunglasses. If the frames only pinch when the hat is on, check where the inner sweatband meets the arms of the glasses. A different hat shape or slimmer temple arms may solve the problem without buying a looser size.
Check the brim from the side
Look at your profile in a mirror. The brim should clear the top of the frames without pushing them down. Try the hat in your normal position first. If you have to tilt it back substantially to clear the glasses, compare another shape before committing.
From the FARNELLI collection
The Bullhide Land of Freedom gives you a shapeable straw style to compare if you like a Western silhouette and want to evaluate brim clearance.