The legality will depend entirely upon the nature of the intellectual property agreements you have signed or agreed to at your local institution, or that are otherwise in force in your local jurisdiction.
But based at a quick high-level read of your description, you seem to indicate you were paid to perform work as a research assistant, and during the conduct of that work you spent a significant portion of time planning a research project. By any definition I have ever seen, this would count as "work product" as part of that position, unless it somehow greatly differed from the nature and subject of the work you were being paid to perform. Even if it was different, most IP agreements tend to be very favorable to the "employer" part of the relationship (because of course, guess who writes those documents).
You'd have to speak to a lawyer for specifics, but in general you would be expected to provide any working materials, artifacts, or other creations/documents you have regarding the project to your former employer if requested (and really as a matter of practice). I have not heard of any situation where this requires extensive new creation, though - so creating a plan and description beyond what you had during that time would be beyond the pale.
From the perspective of this disinterested third-party, however, it kind of sounds dangerously like you want to have been paid to perform work, then keep that work to yourself for your own future advantage and benefit while shafting the people that paid you by not providing to them all the benefits they paid for in good faith. This is certainly not a pro-social behavior, and sets off alarm bells that you don't sound like a kind of contributor I'd be comfortable working with. At the same time, telling someone else to give up an idea so you can assign it to someone else so that they can be the first author and the person who came up with it will be in some subordinate position is also not pro-social, and is a big red flag that I wouldn't want to work with a person like that in the future either!
You are most certainly in your rights to decide ongoing involvement with a project, however, so if you want to turn in your old work ideas, wash your hands of the situation and tell them you don't want to be involved as an author further as you will be pursuing a similar-but-different line of research than what you had initially planned, you could do that. But I would really, strongly suggest you get any new advisor involved in your new lab involved before you decide on any such course of action, because if a professor did this to another professor it would likely be seen as quite aggressive and possibly the start of a long rivalry. Very dangerous for a person in a more fragile position to try to do!
I would tend to err towards "I have lots of ideas, no need to get hung up on one single idea that someone else was paying me for". If the check cleared, I prefer to give people what they paid for and part ways, wishing them the best of luck and removing myself from ongoing entanglement if the relationship is no longer a positive one.