Yes, it is possible.
By using "Audience Visibility" within the course settings.
Before using it, you must have created dynamic audiences with the rules that you want to apply to the visibility conditions you want to enforce.
Let me use your example.
You have to start by adding a custom field called "Type" within the user's profile.
For user trainee1 you must add "Trainer" to "Type" and "Partner" for user partner1.
Then you must create 2 dynamic audiences, TRAINING and PARTNER, with 1 simple rule, that only users with "Trainer" or "Partner" on field "Type" respectively can be added automatically.
Then, within course settings you must go to "Audience Visibility" and select "Visible to enrolled users and members of the selected audiences" and select "TRAINING" or "PARTNER" depending on the course.
Because user trainee1 can only see courses visible to his/her audiences, courses within "PARTNER" category will be invisible and therefore that particular category won't be listed.
Try it and let me know.