(Not a teacher)In the first 'not' negates 'can' so it means 'cannot do sth', in English. In the second 'not' is related to 'do' so it means 'do not have to'.
So, you've said the first Polish translation - 'not can do something' - equates to English - 'Can't do something'. You are wondering if there is a way to say 'don't have to do something' using 'can', I think?
You could say 'I can not do something'. It is more a rhetorical use than practical, however:
Person 1: You can read 'War and Peace' on the flight.
Person 2: Or, I can not read it, and watch a chick-flick instead.
Person 2 isn't negating 'can' in this sentence. If they were it would be 'I am not able to read it'. They are negating 'read', meaning that they won't read it. I say it is more rhetorical because it is usually a response to someone saying 'You can...'. It's purpose is to negate what the person said previously, I doubt it can be used in an utterance on it's own.
About a way for saying 'I don't have to do it' using 'can'; you could say 'I can't have to do it', but it would be a very specific occurance:
Person 1: You have to shake hands with the Queen when you meet her.
Person 2: I can't have to shake her hand, I don't have any arms!
Student or Learner