If I have a Technical Machine attached to Goldeen that has the "Festival Lead" Ability, can I use its "Whirlpool" attack first and then attack with the TM attack?
No, Festival Lead does not work with TM's; it has to be an attack that the Pokemon has printed on the card.
Source: Twilight Masquerade FAQ; TPCi Rules Team (2024-05-23)

Relevant cards

Note: All applicable cards may not be listed below.
SV6_44
SV6_44