Is it possible to whitelist contacts using the iOS iMessage app or iOS parental controls?
There is not a way to whitelist contacts as the default in Screen Time.  However, you can choose specific contacts to whitelist during downtime.  This only gets you part of what you're asking for but, as per the comments, you wanted more info on how to do this.  The answer assumes you're using iOS 13 (wasn't mentioned in your question).  Source:

Set Communication Limits


Open "Settings" on your kid’s iPhone
Swipe down if needed and tap "Screen Time"
Choose "Communication Limits"
You can now pick communication limits during allowed screen time and downtime.  Based on the way this feature works, you may want to review your kid’s contacts to make sure you approve of all of them.


Contacts Only

The first option is to set communication limits for allowed Screen Time use. This offers “Everyone” or “Contacts Only” as the two options. When “Contacts Only” is selected, your child won’t be able to edit contacts.





Specific Contacts

The next communication limits apply to device downtime. When Contacts Only is selected for the “During Allowed Screen Time” portion, you’ll see the choice for Contacts Only for downtime or Specific Contacts.

Once you choose “Specific Contacts,” you can whitelist the contacts you’d like to permit.