There are numerous reasons for a pain signal to be generated and the lack of details in your question makes it impossible to answer.
1) Icing is of limited value for swelling, it has no effect on damaged tissue or any other conditions which would cause a pain signal to be generated.
2) Anti inflammatory drugs make no sense to me; how do you know it's inflamed and exactly what does inflamed mean? Then there is the issue of consuming a drug which affects your whole body while only your ankle has a problem. Does your heart really need to be subjected to this drug?
Pain is the subjective interpretation/feeling of a signal. To heal the brain has to know what's wrong so it can respond if you block or kill that signal your brain never knows and the injury never heals.