The law does not give the tackled player the right to present the ball. Rather, (if he elects not to pass or get up) it requires him to release the ball immediately, and allows the tackled player to do this by reaching out in any direction.
This close to the goal line, these points matter (to the players) more than they would on half way. The would-be scorer (i.e. you) knew full well you were taking a chance on being able to reach the line. You also knew (I suspect) that once you'd elected to release the ball by placing it forward, you had no right to a second bite of the cherry. Thus you knew very well that by grabbing that second bite, you were acting illegally within a few inches of the goal line, as a result of which your team scored.
In my view, the ref bottled it (I'm pretty sure he knew it was wrong as well, but didn't dare to blow). If there was genuinely no-one else around to be inconvenienced, I bet you'd have released, got up and scored yourself. The fact that you didn't tells me that your action was material and should have been penalised. Refereeing is all about the confidence (and the knowledge) to make the tough calls; at the lower end a referee will often fail this test - but he shouldn't then moan if he doesn't get promoted.