The first-cut, rough answer is, yes, you can. Another answer is, no matter what, most of what you have to do has to be done alone in a quiet room with the book, or books, lecture notes, or whatever.

But there are some risks.

First, broadly a big risk is getting off track. There are many poor books, and dig into one of those and might not ever come out. And there are side streets; might go down one of those and never get back to the main road. Don't do those things.

So, the lessons: Pick subjects carefully. In any subject, use only very highly recommended books, and use more than one in parallel although likely one book as your 'primary' source and the others as 'supplementary'.

For book recommendations, get those from a better source than Hacker News! I suggest getting recommendations from some of the best courses and professors in the departments of at some of the world's best, and I mean at top 20 or top 10, research universities. So, for a subject you want to learn, find what books such courses, profs, departments, and universities are using and recommending.

Second, another big risk is getting stuck. One way is to encounter an exercise you can't solve, believing that you are missing something important, and then just grinding to a stop, for days, weeks, or forever, on that exercise. Don't do that.

(A) There are a lot of 'misplaced' exercises. Just because an exercise is in a book doesn't mean that it is reasonable to be able to solve it yet. Yes, in a good book you should be able to solve 90% of the exercises, but one book may have 1-20 exercises that are just nasty chuckholes in the road. I know one beautiful book where the exercises are so difficult, and apparently usually beyond the book, that one should get a prize for each doable exercise they find! (B) There are some tricky exercises that are just tricky and not really important. (C) There's no way you are going to miss much if you skip a few exercises. (D) You can continue on, maybe ask for help, look at your supplementary sources, etc. and then either get a solution or conclude that you haven't missed much. Yes, do work hard, but definitely don't get stuck. After enough hours at one spot, just move on.

Going on will sometimes give you the tools you need to resolve the place you were having trouble. Generally it's no sin, and sometimes helpful, to rush ahead quickly, get an overview, and then return to a more complete pass, and the overview can help you judge if the place you were having trouble was important or not. Also there's no way just one pass over some material can be as effective as three or so. E.g., one goal is a 'synthesis' of the material, and that needs several passes and several sources.

Third, there are occasional actual errors in the sources. So, if something doesn't make much sense, then it's wise to suspect an actual error someplace. You might be able to resolve the issue by consulting supplementary sources, doing some derivations on your own, say, to find a counterexample, or asking for help. By now the Internet may actually be a good place to ask for help. And, there's no law against writing the author of a book!

Fourth, some books are just much better than others. And even a good book might make a mess out of a few topics. So, again, consider several sources.

Fifth, there is a broad point about 'standards of quality'. Math is by a wide margin the most precise of all academic subjects. Still, in the total body of math that is done currently or already on the shelves of the libraries, the standards of quality vary widely.

Some of the most highly polished math ever put on paper is by (the collection of largely anonymous mathematicians) Bourbaki; very little of the rest of math is so highly polished; some of the best math and math writing is not as highly polished as Bourbaki.

So, there is a danger: It's possible to work to standards that are, in some or nearly all respects, too high. Beware that in the best work, the best of that work is not some high polish but in the real 'content' that would still be good just copied off a blackboard.

Why high polish? Because it can make one more immune to criticism. But, even Bourbaki gets criticized. Some criticism will always be there. So, don't try to defend against all possible criticism.

So, the 'standards of quality' that might be worth emphasizing would be the real 'content', the 'meaning', the 'significance', the 'power', the 'meat' and not secondary issues such as polish.

Contact with a good university department will give you some insight into what standards of quality you want to pursue, not too high, not too low, worthwhile and not just wasted effort, etc.

As I've written in this thread, it may be important for you to have a good teacher for abstract algebra since that is where your approach to math will take a big change to how the rest of math works -- definitions, theorems, and proofs. You will need to learn how to get the understanding, intuition, 'conceptual models', helpful pictures, promising applications, the meaning, the 'meat', etc. out of presentations that look just abstract or like just abstract nonsense; of course, attempt to do such things only for what are without doubt high quality presentations.

You will need to learn how to write math with definitions, theorems, and proofs, and for that you may need a good prof to read and mark your homework.

If you tackle abstract algebra without a teacher, then beware of these 'side' lessons you need somehow to learn and make some effort, likely not very large, to teach them to yourself. In particular, look at some beautifully written math, e.g., John von Neumann, e.g., his 'Quantum Mechanics', Paul Halmos, Leo Breiman, and pay close attention how they write.

All the warnings aside, if you are careful about avoiding the dangers, then you should be able to do well.

Let me suggest, generally some occasional contact with a good university department should help. E.g., if you work through Halmos 'Finite Dimensional Vector Spaces', Rudin's 'Principles of Mathematical Analysis', MacLane and Birkhoff's 'Algebra', or Leo Breiman's 'Probability', along with supplementary sources for each, then maybe ask to sit in, totally informally, just to observe, one or a few sessions of a corresponding university course. And get some homework assignments and some test copies. Then see if it appears you understood the material. You might be pleasantly surprised! Also, get old copies of the qualifying exams -- if these are easy for you, then you are doing well!

At least at one time, the Princeton math department, a good candidate for the best in the world, just stated that the graduate courses were introductions to research by experts, that no courses were given for preparation for the qualifying exams, and that students were expected to do such preparation on their own. Well, Princeton was stating that they expected students to do much like what you are trying to do, independent study.

There is a big theme: It's a good guess that what's valuable in math is creating new stuff. For a Ph.D. or tenure at a research university, research is the main work. For valuable applications to problems outside math, it may be that work that is at least a little new will be much more valuable.

Then, nearly always original work in math is done largely or totally independently. So, net, at some point, being good at independent work is crucial.