Yes, Kaspersky Anti-Ransomware Tool (KART) requires access to the internet to function properly. It uses the Kaspersky Security Network (KSN) to get real-time information about new threats and to update its databases. Without an internet connection, KART will not be able to provide the best possible protection against ransomware.
However, KART can still block some known ransomware threats even without an internet connection. This is because KART uses a variety of detection methods, including signature-based detection and behavioral analysis. However, without access to the KSN, KART will not be able to detect and block new or emerging ransomware threats.
In your test case, it is likely that KART was able to block the ransomware files after you enabled the internet connection because it was able to download updated databases from the KSN.