Different institutions may have different expectations, but I think this example from Davidson College Library website is fairly typical:
Information qualifies as common knowledge when it can be found in a
significant number of sources and is not considered to be
controversial. General descriptions of social customs, traditions, and
observable world phenomena qualify as common knowledge, as well as
popular expressions and sayings such as “the early bird gets the
worm.” Common knowledge can vary between subject fields, so think
about your audience. If you have doubts about whether something is
common knowledge, ask your professor or another expert in the
Common Knowledge: Davidson College was established in 1837 by
Needs a Citation: Davidson College was established in 1837 by
Presbyterians who bought the land primarily for its rural location,
far from the immoral enticements of cities.
For more information about when you don't need to cite, see:
Ballenger, Bruce P. "Appendix A: Guide to MLA Style." The Curious Researcher: A Guide to Writing Research Papers. New York: Longman,
2009. 257-318. Print.
Contains information about the circumstances in which to cite and some examples of common knowledge.
Fowler, H. Ramsey, and Jane E. Aaron. "Avoiding Plagiarism and Documenting Sources." The Little, Brown Handbook. New York: Pearson
Longman, 2010. 626-634. Print.
Contains a section on what qualifies as common knowledge.
Neville, Colin. “What, When and How to Reference.” The Complete Guide to Referencing and Avoiding Plagiarism. 2nd ed. Maidenhead, GBR:
McGraw-Hill Education, 2010, 14-27. Ebrary. Web. 06 Jan 2015.
Contains numerous examples of when to cite and when a citation is not needed.
In most cases, Euclid's theorem wouldn't need to be cited; anybody with a tertiary education in a maths-adjacent field has probably encountered it. But if you were working in a different context where it might be unfamiliar to many of your readers, then it might be appropriate to cite it.
In the case where you do need to cite it, pretty much any Number Theory 101 textbook ought to be an adequate reference. For statements not likely to be contentious, citations don't always have to be to peer-reviewed sources, and they don't necessarily have to be to the first published appearance of a result.
(Caveat: it is a good idea to avoid chain citations, where you're reporting A's report of B's report of C's publication, but a number theory textbook that includes a proof of Euclid's theorem isn't a chain citation.)