Is the use of flowers forbidden by Canon Law during Lent and Advent during the celebration of the main liturgical events, like the Eucharist, etc.?

It is no longer forbidden by Canon Law, but it is during Lent by the General
Instruction of the Roman Missal [2002].

The GIRM, n. 305 says:

«During Advent the altar may be decorated with flowers with a certain
moderation which conveys the character of this season but which should not
anticipate the full joy of the Nativity of the Lord.

»During Lent decorating the altar with flowers is prohibited. Exceptions are
made, however, for Lætare Sunday (the Fourth Sunday of Lent), solemnities and
feast days.

»The arrangement of flowers should always be modest, and placed around the
altar rather than on top of it.»

This text doesn’t seem to make any difference between Eucharist and other
liturgical events. Anyway, the Benediction with the Holy Sacrament has always
been considered as something that is similar to a short time of solemnity (with
white paraments and as many candles as in a solemnity or feast), so it will be
acceptable to use flowers during the benediction itself, even
during Lent, taking these away as soon the celebration has finished, except
on solemnities and feasts.