But practically speaking, in the real world we reside in, approximately no one authors peer reviewed research without at least being in graduate school. You frequently see "talks" at conferences given by non-PhDs, but it's exceptionally rare to find math or computer science research published in reputable journals or conferences by non-PhDs.
The dirty secret is that the formal barrier to entry was never really the problem. It's extraordinarily difficult to learn how to conduct meaningful research. The structure of a PhD is imperfect, but it places you in direct collaboration with an experienced researcher who can mentor you. Half of the entire work of a PhD program is precisely learning how to learn on your own so you can find interesting research questions.
I don't think it's productive to talk about what's merely possible. A more realistic barometer is what's plausible. Anyone who can bootstrap themselves up to original research in math or computer science through independent study is extremely gifted. You don't want to set a goal that requires you to be extremely gifted right from the start.