Smaller cans of pipe glue have smaller applicators. The brush of the smallest can will probably squeeze in there.
There's also these:
http://www.homedepot.com/p/3-in-PVC-Adjustable-Metal-Ring-DWV-Closet-Flange-888-GPM/202274094
I'd glue, though, if possible.
There's also these:

http://www.homedepot.com/p/3-in-PVC-Adjustable-Metal-Ring-DWV-Closet-Flange-888-GPM/202274094
I'd glue, though, if possible.