I have read that if someone was to check into a drug rehabilitation center in Indonesia they have to list themselves as a drug addict but then have immunity from being procecuted for listing themselves as a drug addict.

If someone were to check  themselves into a drug rehabilitation center in Indonesia, and registered themselves a "drug addict" would they be immune from openly stating that they use drugs?

It seems that article 128 of narcotic laws speak like this:
http://www.flevin.com/id/lgso/translations/JICA%20Mirror/english/4868_UU_35_2009_e.html

Article 128

 
> (3) Narcotics addicts that are old enough as referred to in Article 55
> paragraph (2) are currently undergoing medical rehabilitation 2 (two)
> times the period of medical treatment in the hospital and/or medical
> rehabilitation institutions designated by the government was **not
> sentenced**.
> 


I am not exactly sure what it means. Does that mean anyone can just report that they are addict and got a free license of using illegal drugs?

This article suggest https://www.translatetheweb.com/?ref=TAns&from=&to=en&a=https://www.hukumonline.com/berita/baca/lt595f3a8c67506/pecandu-narkotika-yang-tidak-dapat-dituntut/

yes

Some of my friends told me that too.