This statement is incorrect:
In a tie the team holding the ball at the end of the match wins.
I am not sure what happens if nobody is holding the ball (never seen it)
I've had a game whre the opposing team threw a touchdown in the last second to tie it, so the ball reset and they won it, so it's either the side that last scored, or the side that last held the ball. Since it's possible to have a 0-0 tie too, I'm inclined to believe it's the latter. Such situation is obviously very rare.