I did some research on this in the Catholic Encyclopedia and was frankly quite shocked. In my Protestant context, I am used to people being anointed at their request, when they call for the elders. As a former elder myself, I have anointed people many times and witnessed God's indiscriminate intervention, without prejudice as to whether or not I was in the "right" church.
I am used to people being anointed for all sorts of reasons. At one time I was considering asking a Catholic priest friend of mine for anointing because I was sick, but instead a Presbyterian pastor friend stopped by and I asked him. He gladly did so, even though in his context, I was the first to ever ask him.
I was shocked when reading the Catholic Encyclopedia that perhaps my Catholic friend might not have anointed me because 1) I am not Catholic and 2) I am not on my death bed.
Everyone that Jesus healed was not of any particular Jewish denomination and not everyone was on their death bed. He healed those who had faith. That was the only criterion. If they had committed sins which had caused the sickness, they were forgiven too.
Does anyone know if Catholic practice has been updated since Vatican II? The online Catholic Encyclopedia is 100 years old. Pity we don't have a more updated one online, as I really value that resource.