Consider an in-floor return air duct that is 32" x 22". A standard air filter that closest fits the register is 30" x 20".
What materials should I use to frame the duct so it will snugly hold the filter?
Would non-treated lumber cut to size suffice?
Non PT wood will be fine.
I would build a 32x22" frame out of 2x4's but I would put a 3/4" square notch around the inside diameter of the frame and set the filter into that notch. That will give you a nice seal for the filter but prevent it from falling through. If necessary, add one or two cross braces across the inside of the frame cut to the depth of the notch so the filter has extra support.
Do you have something to screw into on the sides? I'm assuming so since joists are typically 19.2" OC.
I don't see any issue with wood since some builders will run the return through wall cavities without a duct. You may want to include some notches on the sides (but not under, you still want an airtight fit) to get your fingers around the filter to remove it.