How to have a field with a select list widget and custom list entries? In my content type there is a text field that is set using a list (combobox).

When adding new content, the list is displayed with static elements.

I would like to query an external site when the user adds content (or edits the page) and then build the list from the query result. The user can then select from these elements.

Is that possible?
For Drupal 8

Yes, is possible, but you will need to implement your own field type.

You should take a look into the Country module as you will need to implement the OptionsProviderInterface interface.

In the getPossibleOptions method, you will query the external site and get the possible options for your field.

For Drupal 7

You can always take a look inside the Examples module even for Drupal 8 you will find a very useful boilerplate code for your projects. If you want to check another example just go to the Countries module.