Hi Hope this helps,
Application form for the UK Citizenship or naturalisation requires two referees: It is also required that the persons who are going to put down their details (passport, date of birth) and signature should have known the applicant personally for 3 years.
It is NOT necessary that both referees have to be UK citizens as one can be of any nationality provided that the person holds a professional standing. What it means that the person has to be either a professional such as an accountant, solicitor, police officer etc. or he/she must have a good standing in the community. For example a minister of a recognised religion or a member of Parliament. A list of persons who can act in the capacity of professional persons is available on GOV.UK’s
https://www.gov.im/media/624353/listofreferees.pdf
The requirements for the second referee are slightly different as this person has has to be a UK citizen and he/she must be at least 25 years of age.
While an applicant may have friends who are British citizens and therefore can act as a referee; however, finding a referee of professional standing can be little bit difficult if not impossible. According to the rules specified on the naturalisation form, the referees have to declare that they have known the applicant personally for three years and if they intentionally give false information or hide any factual information, they can be subject to a fine of £5000 or imprisonment of 3 months or both. So unless you know each referee for the specific time, it is very unlikely that they will make that declaration.