Your function fails to satisfy the requirements of your question in several ways. Let's look at the first two sentences.
Write a function flipvec that will receive one input argument.
Your function does technically satisfy this requirement, though ...
If the input argument is a row vector, the function will reverse the order and return a new row vector.
your function fails this requirement in two different ways. The first is that it completely ignores the input argument with which it was called. It instead asks the user to input another array and operates on that array. To satisfy this requirement, don't ignore the input argument -- just remove the input statement.
The second is that it does not return the array that has been reversed (or not reversed, if it's a matrix.) Instead it returns the array that you asked the user to input. The reversed array is called newout or vecout but the contents of the vector out will be returned from your function. That's why the function doesn't appear to flip the vector -- it does, but throws away the flipped vector and returns the vector entered at the input prompt. To satisfy this requirement, return the correct variable from your function (or assign the thing you want returned to the correct variable, to phrase that a bit differently.)
Now looking at some sections of your code:
What happens if you call your function with the array [] (or pass it in as an input argument?) You've made an assumption, that out has a first row, and that's not always a valid assumption. You could check the output of the size function, but unless your assignment prohibits using them I'd suggest isrow and iscolumn instead.
Nowhere in the text of the assignment does it state that you should display anything. It states that your function should return something, but you don't have to display something in order to return it. You just have to specify it in your function definition. if s == 1
disp(out)
elseif s ==0
The only thing the isscalar function included in MATLAB (which is what you used to create s) can return are the logical values false (0) or true (1) so the check that s is 0 if it's not 1 isn't really necessary. You could change the elseif into an else.
This is unnecessary. When a function exits [*], its workspace is destroyed after anything that the function returns has been returned to its caller. [* For simplicity I'm ignoring nested functions in this discussion.] MATLAB will clear up after itself.
As for why you receive ans as output, that's the documented and expected behavior. Call your function with an output argument and/or with a semicolon at the end of the function call if you want to avoid assignments to ans. See the "Result of a Simple Calculation" example on that documentation page; the line that defines result doesn't create or update ans.