Anybody can resign at any time.
Why he did not take the draw sounds like he is throwing the game to hurt someone else in the standings. He needed a win for himself but otherwise he preferred x lose and y win (or place higher).
is it legal to reply with resignation when a draw is offered?
Of course. This is all that the FIDE Laws of Chess has to say about resignation:
5.1.2 The game is won by the player whose opponent declares he resigns. This immediately ends the game.
You can resign at any time during the game. It doesn't even need to be your turn. I have done this. I once ...