A priest does not have the absolute duty to offer you absolution. If he feels that you are not sorry or contrite for your sins, he may refuse someone absolution for good reason. Among those reasons are that the person is not a Catholic, (a priest has no jurisdiction or authority over someone who is not Catholic) or the person may appear to not be sorry for his or her sins. In this case the priest may tell the person that he cannot offer them absolution because they do not appear to be sorry for their sins, or may tell them that they will grant absolution, but if the person is not truly sorry for offending God and their fellow man, that the absolution is not magic, and is not valid, (ie their sins are not forgiven).
If one is truly sorry for his sins, and you are refused absolution by a priest for some reason, then you can either go back to that priest or to another priest and receive absolution after confessing your sin.
There is another case that is somewhat like the above, there are people who suffer from what are called scruples. These people have a spiritual, and sometiems a psychological illness that makes them so overly self contious that they think everything is a sin, and that they are not forgiven even if they go to confession over and over again. In cases like this a priest who has experience with people with scruples should hear the pearson’s confession and offer them spritual counsel so they can hopefully overcome the problem.