Yes, magic items can and do allow you to cast spells with long casting times as actions
If a specific rule contradicts a general rule, the specific rule wins.
Here, you are giving examples of items that are giving specific rule that contradicts the general rule on casting times.
The DMG even states that some magic items can modify the casting times:
[A spell cast from a magic item] uses its normal casting time, range, and duration, and the user of the item must concentrate if the spell requires concentration. Certain items make exceptions to these rules, changing the casting time, duration, or other parts of a spell. (DMG p. 141)
The Staff of the Woodlands is indeed one of those exceptional items. It says:
You can use an action to expend 1 or more of the staff's charges to cast one of the following spells from it [...]
The rule for this staff says that you use an action to cast a spell. The fact that one of those spells is awaken (normal casting time 8 hours) does not matter. That casting time is now superseded by the effect of the magic item.
Thus, any similar magic item that has some effect in it that modifies the casting time, will similarly override the general rule. In this way, magic items can indeed allow you to cast spells using a shorter casting time than normal.
Other effects can modify casting times as well
Spells (eg Wish), metamagic, and other features already exist to modify the casting times of spells. So magic item use is far from the only example of a specific effect overriding spells' casting times.
Jeremy Crawford also explicitly agrees with this:
The staff of the woodlands allows you to cast the awaken spell as an action, superseding the spell's normal casting time of 8 hours. Some magic items make exceptions like that, as noted on page 141 of the Dungeon Master's Guide (see the "Spells" section on that page).
And he also agrees in the very similar case of the necklace of prayer beads:
A necklace of prayer beads lets you cast a spell it contains as a bonus action, regardless of the spell's normal casting time. For more about how the necklace works, see page 182 of the Dungeon Master's Guide.
You may interrupt the casting of a spell as soon as you see it is being cast, by using your reaction.
The casting time of Counterspell is
1 reaction, which you take when you see a creature within 60 feet of you casting a spell.
If a spell has a casting time of 1 minute, they are casting for that 1 minute and if you see them you may counterspell. If the casting time is 1 action you must immediately spend your reaction to counterspell or miss your window.
You attempt to interrupt a creature in the process of casting a spell.
The key here is interrupt. You may do so at any point during the casting.
Best Answer
TL;DR: NPCs do not have to follow the rules for PCs. They follow the rules on their statistic blocks. (Also, PCs should not hope to be able to do everything an NPC can). So yes, he can cast the longest-casting spell using his legendary action.
And we are not talking about any tavern brawl NPC. This is Acererak, arguably
The Most Famous Lick(sic) Ever in All D&D History ™!!!!!!!
(Drool, Larlock. You'll never be this cool)
It is a Legendary Foe, a BBEG in all his splendor. He was the floating skull that sucked the soul of your grandpa's paladin back in the 1980's.
So yes, he can cast in a single legendary action if the adventure says he does.
Too bad he can't use a Gibson as his focus.