Yes, they can. There's no OS limitations on where Google Classroom works, or whatnot. Where Apple lost the classrom (and it's happening to Microsoft as well) is the manageability that Google offers for fleets of Chromebooks. It's trivial to setup, configure, well...everything. Nothing Apple offers even comes close to managing 1000 ipads, for example...not to say 1000 Macbooks. You need third-party solutions that cost yearly on top of the device purchase.
With Google, it's $33 one time for a device and you have full management over it from then on.
Now, yeah, there's an argument to be made over build quality of a $200 laptop over any Macbook, and then you have the built in obsolence (Chromebooks have a built in expiration date, look it up) you have to deal with. Still, a school can spend $200 on a device + $33 one time and still come out miles ahead vs a Mac that is not easy to repair (many schools have in house Chromebook repairs, and the various OEMS provide tools, training and parts) and you have to pay a yearly fee to Meraki, Jamf, etc to manage the device.
There's not one reason that Google has taken over K-12, but several. And Apple missed the boat long ago, even if they produced cheap hardware.