How to add Sidebar and Full width option in post editor

WordPress provides a template hierarchy which gives you the flexibility to create custom layouts for posts, pages, archives, etc. To create a custom layout for a specific blog post, you would name the template single-{post-type}-{slug}.php

You can find out more about the template hierarchy here