No, you can use it from anywhere as long as ULib has been loaded first.
If you're using code that runs as soon as the server starts, you might want to add checks to make sure ULib has loaded before trying to call it or you might get errors. That's why we suggest using the modules folder before it always gets loaded after ULib, but you can use the code anywhere.