For an established professional, it might be a little odd, but for someone starting out on a career, those first jobs are hard to get without something to show. I wouldn’t place the work in an online portfolio, however — especially if aspects of the made-up project for the real company borrowed the intellectual property of that organization.
An employee’s work always legally belongs to the company. A contractor typically retains some rights to the work unless those rights are signed away. Some companies object to work done for them being published online. Others don’t care. There are few situations where work can’t be shown in a physical portfolio at a job interview, however. The one exception I can think of is if a non-disclosure agreement has been signed. In my contracts, just to remove any ambiguity, I typically add a clause saying I retain the rights to use images of the work for self-promotional purposes. I haven’t had many clients object to that.
I don’t think there would be a problem in a physical portfolio. It’s ethically important to honestly represent the situation to those you’re showing your portfolio too, of course. You don’t want to misrepresent the situation. Online, though, like I mentioned, I wouldn’t show it.