That's pretty common on any smaller displacement engine. On something like this Corolla - not uncommon for the A/C to consume 20%-25% of the available engine power.
The engine overheat from a potential headgasket issue - that is another matter. Really depends on which model year Corolla you have - if it is something like the 8th gen or newer (1998+ model years) - only takes on good overheat to warp the head.
By design, the cylinder head cannot be "decked" or machined to remove any warping - it has to be replaced. If you saw the temperature gauge spike and immediately shutdown the engine - your probably fine. Just keep an eye on oil and coolant levels, make sure the temperature doesn't rise above the 1/2 way point on the temp gauge.
Note that a blown headgasket is not a known issue with the 8th gen + Corollas with the 1.8L engine, but was a potential issue with the 2.4L engine. The corporate 2.4L engine was used in a number of different models - some owners had the head bolts loosen over time, causing a blown head gasket. The 1.8L by comparison, had much stronger attachment between the head and block - so only way it would get damaged was from outside sources (improper coolant, loss of coolant, consistently low oil levels, bad water pump, damaged radiator, etc.)