... but it give me an error.
Without seeing your code, or being given any information about the error, it is difficult to explain the problem. However here is an example that does do what you suggested. I constructed an oversized layout and loaded it to the Activity. Then I modified the app to load a scrollview at run-time and loaded the unmodified layout into the scrollview panel. So it can be done.
The "parent" shown in the designer is still "Activity", but that doesn't mean that the layout cannot be loaded to another view. For that reason I think that your first suggestion can also be made to work. Make a new layout with just a scrollview and load that to the activity, then load your existing layout to the scrollview panel. There is no need to change the "parent" shown in the Designer.