I must finish by eight o'clock tonight, should be accepted.
No, that would be a different sentence, rhaid i fi orffen ERBYN wyth o'r gloch heno.
"Erbyn" stating a limit and "am" the need for an exact time? (Just checking)
I agree. Unless the person has to finish at exactly eight o'clock, it would be more normal to say "by eight o'clock."
However, if we ignore the usefulness of the sentence and concentrate on just translating it, then "at" is what is needed here.
I will continue studying parsnips and dragons as long as I can but have something else to do at 8 o'clock. So that is when I will have to stop the studying.
I wrote had to and it was wrong?
'I had to finish' is in the past tense. 'I have to finish' is the present tense, which is what is needed here.