For example I answered a question and an external site helped me in finding that solution. Is it okay to add a reference to that site in my answer?
The Ebooks Stack Exchange is not a search engine or a collection of links. It's okay to add links for further reading, but this site was created to build a definitive collection of answers to ebook questions.
The folks here will work hard to curate this collection of knowledge, so when someone comes looking for answers through search, the last thing we should be doing is sending them *elsewhere* to find that information. Showing them the door might seem helpful in a single instance, but ultimately link-only answers do little more than add another barrier between future readers and the actual information they are looking for.
That's not making the Internet better.
Current SE policy discourages link-only answers and require the answers to be self-contained, so that they remain valid after the external link is no more available.
Links in answers are welcomed, as long as they provide additional reference etc. (so no ads). You are therefore free and welcomed to put links to external helpful resources, as long as they are additional information and the answer is still valid without them.
If you have copied any content verbatim, you have to give a reference to the other site. Copying without admonition is a reason to remove an answer on SO/SE.
If you looked things up on another site, but completely reworded information in your own answer, you don't really have to put in a reference. But it is still nice for the reader of your answer (in case there is more information on the subject on the other site, now or in the future).
Put another way, if there is an external resource or reference that helps to answer the question, then by all means link to it. To avoid requiring users to go to another site to get the information, and avoiding link rot issues, excerpt relevant parts of the linked resource in your response. We want to have the relevant details on this site.