Your second sentence suggestions sounds accurate. It does not change the meaning of what you want to say.
Alternatively, you could say "The assignment must be handed in by tomorrow morning" or "I must hand in the assignment by tomorrow morning".
Since it's an obligation, we use "must" instead of "have to".