It was Mayor Shinn's other daughter, Gracie, who rats out Tommy Djilas - not Amaryllis.
And Gracie wasn't the only one who saw Tommy place the firecracker behind Mrs. Shinn; she was simply the first to speak up. After she does so, you can hear another voice in the crowd confirming Gracie's accusation.
Of course, you can't help but wonder why the filmmakers didn't provide more concealment for Tommy. The auditorium is filled to capacity, and at that moment the audience's attention is directed at Mrs. Shinn - and there's Tommy, in full view, lighting the firecracker and putting it right behind Eulalie. Well, NATURALLY someone's going to see what he's doing!
The thing that makes me laugh about that scene is that Zaneeta, the Mayor's other daughter, clearly witnesses what's happening and is overjoyed by his prank. I know she's sweet on him, but that firecracker is HUGE; it looks more like a stick of dynamite. You'd think she might show a moment of concern when she sees what he's planning (and then perhaps laugh when she realizes no harm had been done). But no, she sees him lighting that fuse and she's absolutely delighted.
Which is why musical films should never be taken too seriously.