If you did, you will always have done it, but you will always have used the winning number and will only receive half the winnings. You couldn't use a draw with no winners, because you will have never won in that case.
You always will have had won, you aren't taking money away from anyone but yourself, and you only find out the winning number after you already won; so it is legal.
The morality of using a time machine to win the lottery is debatable.
If you can TT there are way better ways to make money. You can travel in both time and space, or you're dead like all the other travelers that buried, sky-dove, or spaced themselves... So many forget galactic motion even if they get the solar orbital and rotational calculation correct.
If you can pull off such a feat then get a space suit and hit up the closest M-type astroid. The potential wealth on a single M-type astroid can dwarf all the wealth extracted by humans on Earth in the Holocene; yeah all of it. Planetary differentiation due to gravity is a tyrant that steals away all the valuable stuff in the center of the planet. All our elementally rare materials are the leftover scraps from late collisions after the surface solidified. M-type astroids are the metal core remnants of a differentiated body that was broken up. The wealth they contain is massive and unlike anything humans can access presently.
You want a lottery? I give you a new chapter of humanity and crush the very meaning of wealth.