I've been living in the UK for 11 years. I want to know if it is possible that one of my friends who is from Egypt but is working in Europe for the past nine years and has a Schengen visa is allowed to visit the UK. On GOV they are saying that it is allowed.
It is possible, though he will need a separate visa for the UK than the schengen visa. Its a well known problem for many non-EU people in the UK/I or mainland Europe that they can't easily go to the other one.
Since he is working in Germany, can prove he is settled there, etc... he shouldn't have any problems getting the visa. But he still has to go through the application process, which might be annoying.
Having residency in a Schengen country does not allow entry to the UK. Entering the information from your question into the UK government's site to check whether a visa is required shows that your friend will need a UK visitor visa.