I think you're kind of asking a couple questions here. I'm going to say the more important one is how to create the association in the opposite direction from how it's usually built (because that's the one I know how to answer). I'll focus on that.
For simplicity, I'll just define a simple text field with label you can fill in as part of your form.
= label_tag :new_category_name
= text_field_tag :new_category_name
In your controller, you can then build the new category like so.
@post.build_category(name: params[:new_category_name])
If you're saving your @post the conventional way, then the category will be created in the same transaction as the post, so if that fails it won't create the category. If you want it to save the category no matter what you can call @post.create_category
instead.
Here's the documentation:
http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html
In the table Singular associations (one-to-one), replace other
with your model name.
The other question I think is how to make it look good in the view. You certainly have options for how to make it look good. You can create a popup as you suggested. You could also use AJAX to send a small xhr request. I've seen fancy combination select / text boxes too.