I know that it's possible to change the values of signals and variables via the Verilog Programming Interface (VPI). It's also possible to trigger a named event, by doing a vpi_put_value(...)
on it.
Is it somehow possible to call a function or to start a task?
The VPI does not let you call tasks or functions from C, but the DPI does. Technically, the DPI only allows you to call SystemVerilog routines from C routines that have been called from SystemVerilog. The DPI has an import/export mechanism that needs to maintain the process identities of all threads created by your SystemVerilog code.