Well, first off, you can't use real religion to spread hate or bigotry in a fantasy novel. This means no using religious differences as a way to create villains or justify discrimination. Secondly, when using real - religion - inspired elements, you should consider the global and diverse readership. What might be acceptable in one culture may not be in another. So, it's important to tread carefully. You might be able to use religious symbols or ideas in a more abstract way, like using the concept of 'light' from some religions as a symbol of good in your novel's magic system, but always be cautious not to cross the line into disrespect or misappropriation.
The rules include being accurate if you do reference real religion. If you're going to include elements of, say, Islam in your fantasy novel, make sure you have a basic understanding of its practices and beliefs so you don't mis - represent it. Additionally, keep it in the context of the fantasy world. Don't make it seem like you're trying to rewrite or interfere with the real - world religious understanding. And most importantly, be sensitive to the feelings of the believers. A single offensive line about a real religion can lead to a lot of negative reactions.