I told him don't curse me
Given the secret Frank is holding inside, “i told him don’t curse me” is not a diss to Islam (as further explained in “The Unsung Words of "Bad Religion”), but instead a testament to the pain and agony he feels inside.
Frank is tormented by religion because of the secret he is holding within, which is conflicting with his religion out of vain (given that the person he loves— which is forbidden— isn’t even reciprocating the feeling). when he’s trying to get away from the demons, he is trying to get away from religion.
In Islamic theology, demons consider prayers like Allahu Akhbar to be curses, it’s considered to be a method of exorcism. Maybe Ocean thinks of himself as demonic, hence why he would need prayer.
This could also simply be a cheeky line meant to indicate Frank’s lack of familiarity with religion. He wasn’t sure what the taxi driver said, but assumed it to be a curse of some kind.
To help improve the meaning of these lyrics, visit "Bad Religion" by Frank Ocean Lyrics and leave a comment on the lyrics box