Sure, you can - but the chances of you actually getting paid for it are miniscule. You'll have given the poster your work for free and spent a couple of connects for the privilege.
re: "Is it ok to attach completed work to the proposal?"
How about you do that somewhere else.
If you want to do free work, you can volunteer at your local school, church, mosque, community organization, political party, or for a non-profit organization whose causes you support.
If you do work for free on Upwork, it really messes things up for the rest of us who are here to earn money. And it messes things up for clients, too, in more ways that in can go into here.
I thought it might be a common practice, or simply a good way to get started, but I felt like that wouldn't be fair for other freelancers, so I wanted to just ask. Thank you, you're right!
I felt like that wouldn't be fair for other freelancers,
Other freelancers? The only other freelancer it would have a negative impact on is you. You don't get paid and you don't get anything if you work for free. And nobody will pay you if you give them things for free. This is the Internet.
"Where darkness shines like dazzling light" —William Ashbless