How to delete a webform submission in a custom module?
If you are calling this webform_submission_delete() function, then both the first and second parameters must be objects. At least the first parameter is a node object. Most likely you are calling this using:

$nid = 12345;
webform_submission_delete($nid, $sid);


instead of doing

$node = node_load(12345);
webform_submission_delete($node, $sid);


and as a result causing PHP to complain.

If you have doubts on how to implement webform_submissions_delete(), I suggest you take a look at the various functions that implement it for an example.