Usually there are other people watching, and the "judge" is supposed to be near the last games watching anyway.
But yes, sometimes a player will have a draw at the last second, and the opponent lies and says he won on time. If there are no witnesses, and your opponent is a very convincing liar, then maybe you will lose.
But they separate the players, and ask them to tell the story and they ask people who may have been watching, and try to see who is lying. I saw this happen once, and the opponent finally said ok, I agree it was a draw.
You are in a tournament with an advantage at the end with a king, knight, and bishop against a king. But you do not have enough time; let's say 10 seconds to do 30 moves and win ...
Can you try to win until you see that you will not succeed, and ask for a draw at the last second?
What if the opponent refuses to draw purposely and your time expires while you are asking for the draw at the last second ?
What will the judge do when he see that your time is up?