Non-duality is an approach, not a state. People who can consistently adopt a non-dual perspective, we call ‘enlightened’. It’s characterized by the diminishment of the influence that the patterns of thought we call ego have on your thought processes.
You achieve a non-dual perspective through the process called surrender. It doesn’t really matter what you’re surrendering to. The ego is lessened either way. You can call it God, the Flying Spaghetti Monster, or “the universe.” The point is you’re giving up the need to control the outcome.
Prayer is, ideally, a form of surrender.
Even the enlightened have moments of ego. The difference is that they know what to do with those moments. Surrender them. Usually by this point they’ve dispensed with the need for an external agency to surrender to. You just let go.