The problem you have here probably based on fact that posts and pages are completely separate post types in WordPress hierarchy. A single blog post doesn’t have any parent (calling it’s parent will return 0). The fact that you query ‘portfolio’ post type on portfolio.php page doesn’t mean anything to WordPress in the means of hierarchy.
If you want to style portfolio and blog posts differently you have to make them separate post types and then use single.php or single-blog.php for blog posts and single-portfolio.php for portfolio posts.
If you want to get the page template that queries your portfolio posts while being on single portfolio post you will have to either get this information from theme options (where user sets which page is a portfolio page) or you will have to query all pages, check the page template the page uses and return the ID of a page that uses portfolio.php page template.
Above solutions won’t work if user wants to have two completely separate blogs, though. For this you could use post meta values on pages.
What is it exactly that you want to achieve by passing values from index.php or portfolio.php to single.php?