To be more precise in order to be able to pay on the lightning network you need to have at least one channel with another node.
This other node does not have to have a direct channel with the person you are about to pay.
A mandatory condition for you to pay a node is that there is a path consisting of payment channels from your node to the recipient. That path must not be longer than 20 hops. In practice it will be much shorter.
However having such a path is not sufficient. Every node on the path needs to have enough liquidity in their channel to forward the payment. This condition is not possible for you to proof before selecting the path (and a reason why in practise when routing payments several paths will be tested or a payment might fail anyway)
In particular you don't need to be connected to the recipient. Only thing that currently has to happen is that you need to get an invoice from the recipient but also that could come to you over an arbitrary medium of communication including pen and paper.