Yes, it is quite possible to do graduate school.
If the Army sends you, it is a competitive process and you incur additional commitment. The upside is that you get full pay and benefits while attending. Also, graduate school admissions look very favorably upon applicants sponsored by the Army.
Another option is to get a graduate degree part-time, at your own expense, while serving.
While I am only directly familiar with Navy programs, I am confident the Army offers Tuition Aid and has the same general programs as the other services.
TA can be used to fund all or part of undergrad and advanced degrees for officer and enlisted. Those degrees generally have to be in some subjects of use to the Army, from an accredited institution, and can be online or after-hours. On your own time but I don't believe on your own dime completely.
Only a small percentage of new officers out of an SA or ROTC go right to grad school. There is TA, full-time student status at the Army War College, exchange duty slots at AFIT and Naval Postgraduate School, full-time programs at civilian grad schools, and more that I am sure Army folk will comment on.
Full-time student duty usually occurs at some point near the mid-to-end of obligated service period, but depends on many factors. In general, officers get their Master's sometime between O-2 and O-4 pay grades. It's one of those blocks to check for promotability.
I used Navy TA for my first Master's, going after-hours, and two tours later, the Navy sent me full-time to the Naval Postgraduate School for my 2nd. A Navy goof - to my benefit. They normally don't pay for two; they lost the paperwork for the first one.
I am sure Army folk can add more specifics. I did not agree with "at your own expense," but perhaps Army has dried up their TA fund to drive down-sizing. You can always pay for a degree on your own, on your own time, as usually there is additional service obligation required, running either concurrently or consecutively, depending on current policy. In that case, you owe no time.
Once you separate, there are GI Bill educational benefits and potentially educational benefits from state of residence and the state veterans agency.