Sure you can.
I use Rosewill rackmounted cases because they're cheap and get the job done. They're a far cry from any enterprise gear, but that's not really needed in a homelab. Think of the typical material used on a desktop PC.
This is the case I use, but see if anything else jumps out at you:
Rosewill RSV-R4200U 4U Server Chassis Rackmount Case | 11 3.5" Bays, 3 2.5" Devices| ATX, CEB Compatible | 2 120mm Fan, 2 80mm Fans | USB 3.0, USB 2.0 | Black https://a.co/d/icPXCTH
The official Rosewill rails are pretty crap, so I used these. They work great:
iStar TC-RAIL-20 20-Inch Sliding Rail Kit for Most Rackmount Chassis https://a.co/d/iaJBFNl
Beyond that, where you want to go is sort of up to you. Really any motherboard / CPU / RAM will do if you're only using it for storage. I used a few different parts I had laying around already, and then got some open box ones off eBay for things I needed to finish out the build.
OS is up to you as well. I like unRAID because it's the "grow as you go" OS, but I've used TrueNAS in the past as well. Both are solid options but have a lot of different pros and cons.