What if I have some resource(image, for example), and I want it to be accessible only to persons who have a link to it. How to generate such a link(identifier)? Is UUID suitable for this?
This is exactly how unlisted videos work in YouTube. People can only see an unlisted video if they have a link to it, but there's nothing you can do to prevent them from sharing the link.
For that reason, there's no point using a UUID (effectively a 128-bit number), which would result in giant URLs. Even YouTube identifiers are only equivalent to about 64 bits. If you only have, say, 256 unlisted URLs that you want to hide from casual observers, then a random number with 2^40 possibilities (e.g., a 10-digit hex number or 8-digit base-32 number) would be more than adequate, unless you really want to defeat brute-force attacks that would require a billion guesses to succeed in finding just one unlisted resource.
Also bear in mind that any external links from your unlisted resource could also be traced back via Referer headers, not just from HTML hyperlinks but also from the inclusion of external resources like Javascript libraries and web fonts. Using the robots exclusion standard might help a little bit in this regard.