Maybe you'll sign up for some official program in the university. Maybe you'll even get a research grant. It may exist. Writing a grant proposal may be the single most valuable experience of your project. Just keep in mind that professional relationships are the real substance of research.
Administrative details are secondary.
Maybe you won't even formalize the arrangement at all. The important things, after all, are the experience you'll get, the relationships you'll develop, and the research paper that you can include in graduate school applications. In particular, it is not crucially important how well your research project turns out. On the other hand, if your project works out well enough to produce a publishable paper, by all means go for it. But this is not necessary.