Yes, a lot of projectors have a USB connection, or an SD card slot etc.
But they can be fussy about what sort of files they will actually read. ie they may only read particular types of files, and they may need to be a specific filename/folder structure etc.
Probably fine if you just want to view a few photos etc (though I have used an older projector that wouldn't display photos with a wide aspect ratio). But less likely to work with videos, or any sort of Powerpoint files etc.
If it is your own projector, then you could test it beforehand, and check it actually works as expected. But I wouldn't expect a USB stick to work in some other random projector.