I would offer a more general guideline: if you are using someone else's resources in any capacity whatsoever, it is only prudent to negotiate in advance what happens to the products of your work.
This applies not only to startups, but also to publishing results of your previous work without giving any measurable return on investment (affiliations, co-authorships) to the lab you performed it in.
It is exceedingly rare for the work to be blocked altogether, because then no one wins, everyone loses. The crucial detail here is both sides explicitly agreeing that the deal is fair. It need not be purely monetary, either, but IP has value.
Look at it from a managerial perspective: you take in taxpayer dollars and produce something of value to the taxpayers. Overseeing agencies like to see funding statements on all the things the lab has produced, and they are often fairly specific. As a manager, I get a pat on the back for the lab being efficient, and am generally interested in you doing cool things with the equipment which taxpayers could perceive as a good use of their money. If you do not provide me with grounds to say "hey taxpayers, we did this, is this not great?", then for all I care, you just took the money and ran off. Not great. There is another caveat, too - like BillOnne points out, if something unethical or substandard happens on my watch, I am liable for that and very much not happy about it!
All in all, you should do everything completely above the table, and it may mean jumping through more hoops than otherwise. But these hoops are in place for a good reason.
Indeed, you face a risk of investors clawing back a lot of your hard-earned money, but "either you get a little, or no one gets anything" is not too bad of a negotiating position. There are, indeed, businesses which became successful because of appropriating something valuable at the start, but doing so sneakily is certainly not the way to go.