How to set up Drupal Commerce to sell users the ability to create/post custom nodes (ex. classified ads)?
You can do this with Rules pretty easily.


Create a role with the desired permission.
Create a product to sell.
Create a rule for the checkout complete event.

Condition is that the product you created is in the order. (I would probably create my own condition as I'm better with code than with the Rules interface, but you should be able to set this up in the Rules interface.)
Action is to give user that owns the order the selected role.
There is no step 4, you're done.