Does this also apply when the initial booking was made through a travel agency?
Depends...
If the TA made the res on the AC agent website, bookings can be cancelled/changed free of charge within 24h (same policy as the regularAC website)
If the TA made the booking via the GDS or a different booking channel, policies are often more restrictive (e.g. cancellable until midnight or until the end of the business day only)