I'm guessing "ar scoil" means attending school, but "ag scoil" just means physically there?
The NEID entry for “school” gives both bheith ar scoil and bheith ag an scoil for “to be at school”. The FGB entry for _ar_² I. 4. (a) defines ar scoil in terms of attendance, and the FGB entry for _ag_¹ 1. (a) defines ag an scoil in terms of position, so your guess was on the mark.