'I don't have to do it' doesn't mean what you said. 'I don't have to do it' means that you are under no obligation to do whatever 'it' is. If your parents forbid you to do something, then it is 'I must not do it', the same as hard drugs.
I don't have to do it = I needn't do it = I don't need to do it. They mean the same thing. 'Needn't' is hardly used compared to 'don't need to' and 'don't have to'.
So, it could be 'You needn't ask, just take some', or 'you don't need to ask, just take some.'
I would say perhaps 'needn't' is more used in British English than American. I rarely hear it though.
Your query about 'I have not to do it' is interesting. 'I have not to do it' means exactly something like 'my parents forbade me to do it'. However, 'I have not to do it' doesn't contract to 'I don't have to do it'; you are changing the verb order here and 'do' is the main verb, not the auxiliary (as in 'I don't have to'. The contraction would be 'I haven't to do it'.
Interested in Language