This can be done via cloud code by sending a LogEventRequest to the Request Api. Within the request you can do the following:

Spark.getMultiplayer().cancelMatchmaking(Spark.getPlayer(), "RT_MATCH", "myGroup");

You'll need to ensure that you are referencing the correct match Short Code and group for the pendingMatch you want to cancel.