Hey Carlos,
Yes, you are on the right track. You can easily update the "Enrolment Ends" date field for your user. The webservice function core_enrol_edit_user_enrolment requires three required parameter - courseid, user enrolments id, enrol status and optional parameters like timestart and timeend (timestamp). You can easily find user enrolment id in Moodle's user_enrolment table. This requires a good knowledge of Mysql queries and Moodle's table. You can apply join of user_enrolments and enrol table.
After getting all required fields you can call webservice like
http://localhost/moodle3.6.1/webservice/rest/server.php?wstoken=fd324bf337764cbe45fbdb7760d09604&wsfunction=core_enrol_edit_user_enrolment&moodlewsrestformat=json&courseid=4&ueid=1&status=0×tart=1552410399&timeend=1555089582
If you want I will share the required query with you with the help of which you can get user enrolment id.
If you don't want to do this with webservice API function, you can also use moodle's core function update_user_enrol.
Regards,
Mayank Tyagi