Yes, you can do that. File native.cpp of your project contains all the boilerplate C code for your sketch. You can define and call any functions there. But you can also use the multi-file approach (which is the best thing to do if you have an existing library) as is described here.
Note that a PLC program relies on a main loop running over and over again without significant delays. So functions that block or delay execution (delay,delayMicroseconds) are to be avoided. SimPyLC timers don't suffer from that problem, they don't block execution.