Whom and how to include referees in the CV?
How to decide upon the inclusion of scholars? Naming your supervisor
  of the PhD thesis might be obvious, but then? Do only professors count
  or should the referees come from different institutions, etc.?
  Especially as an ERC (early career researcher), I don't have many
  senior co-authors or collaboration partners at other universities.


This would be a good question to ask your PhD supervisor. They will have a good idea of what is the norm in your field. You have to weigh up the pros and cons of getting a reference from someone who knows you and your work well, but is not in a senior position. Often this can be balanced by having at least one of the other references come from someone senior (likely your supervisor or even head of department).


  Do you ask these people whether it is okay to name them in the CV and
  they might be prepared to get contacted or should I avoid this?


Personally I only list referees in my CV that have explicitly agreed to write me a letter (i.e. I have asked them before even sending any application). Consider how you might feel, as a busy professor, receiving a request to write a reference letter for someone that you didn't even know was applying for jobs. If they are annoyed at the surprise request, this may affect the tone of the letter they write. Overall, it's definitely far more polite to ask them in advance. Furthermore, the majority of jobs (at least in my field) ask the reference letters to be sent with the application, so you have to ask your referees beforehand anyway.