If I glued a closet flange, I would want a stainless steel ring. Putting a spacer under the ring, to raise the ring to about finished floor level would be good. An alternative would be to make a spacer from wood, but buying the plastic one is going to be easier for most people.
Jeff's suggestion of "blocking" underneath is to give the wood screws something more to bite into, other than the plywood subfloor.
There is a non-glue type of flange I would consider: a 3-inch outside compression flange.
These are similar:
plumbest C40-320 3inch pipe outside. 2 inch deep.
Code Blue No Caulk Closet Flange *outside* C40320
Jones Stephens C40320 3 pipe x 2 depth ***
Jones Stephens has built its reputation over the years as a leader in the plumbing industry, providing the market with thousands of products to complete any project. If you need it, we got it. The No Caulk Code Blue Closet Flange makes installment quick and clean with no caulking involved and...
www.homedepot.com
Each of those would need some additional clearance cut .