David Siegel’s answer that it is legal is substantially correct, but there are some edge case scenarios. Whether you are paid for your work is irrelevant for almost all of them.
Substantial copying and copyright violation
Your work can use previous works as sources of information/knowledge, including with short citations. However, if you use large amount of the original work with no modifications or only minor ones, it potentially becomes a copyright violation of the original work.
If the original work was published with an sufficiently permissive license, you may still do it as long as you comply with the license. For instance, Wikipedia uses the CC-BY-SA license, which means you can publish books made entirely of copy-pasted Wikipedia articles (some people have done that), legally (as long as you put the appropriate license information).
That is the only case where the fact that you are paid may matter, for two possible reasons:
- some licenses allow reuse only for non-commercial purposes (e.g. CC-BY-NC), which makes reusing material in a commercial context a copyright violation.
- in the US, reusing copyrighted content is allowed if one meets the condition of fair use; one part of the test is "the purpose and character of the use, including whether such use is of a commercial nature or is for nonprofit educational purposes" (emphasis added). Other jurisdictions may employ similar tests.
Trade secrets and other insider information
An employer or former employer may restrict your ability to disclose information that you obtain in the course of your job. Similarly, you (or your company on your behalf) may have signed non-disclosure agreements with other parties. The details of what restrictions are allowed varies considerably across jurisdictions, though the general principle is the same.
Citing an internal report of a company you worked for without their permission is asking for trouble - it will be pretty strong evidence that you got internal information from that report, even if the same information would be available from public sources.
Classified information
Virtually all countries deem certain information to be state secrets, and disclosing said information bring harsh penalties to people who are supposed to keep it secret (military staff, defense contractors etc.).
Some countries prohibit the publication of classified information by anyone under their jurisdiction. Such restrictions are regularly challenged on freedom-of-speech grounds with more or less success.