I am practicing a song that uses the F♯ aeolian scale ascending and the melody sits between the notes F♯ and C♯. If I play this melody with my right hand (in F♯ position) and place my thumb on F♯, my middle finger hits A in an uncomfortable way. Is there such a thing as playing in F♯ position or would the more correct technique be to play those notes starting F♯ with the second finger and doing a "slide under" technique by playing the A note with the thumb?
Given that 1-2-3-4-5 isn't working for you because of the awkward A, then yes, your next best option is 2-3-1-2-3.
The idea of fixed hand positions is generally a learning tool for beginners, and dispensed with by the time keys like F♯ are encountered. As a pianist gains experience, the general approach is "any fingering that works", where "works" means providing comfort, accuracy, fluidity, and desired musical effect for the individual performer.
The 'fixed position' idea works for beginners, as each of the five notes generally fall under each finger/thumb. It works particularly well when only white keys are involved - as is usual for learners.
Moving on to mostly black keys, though - and you've already identified a problem! I suppose this is where knowing scales can help. When most of us learn the scale/s of F♯ minor (the first five notes are the same for all) we use 2,3,1,2,3 (R.H.). So this seems like a good move for you, too. I've just tried 1,2,3,4,5 and it works fine for me, provided I push my hand a little further away from where it normally goes - deeper into the keys.
A basic premise is to use thumb on white keys when possible - logically, as it's shorter than the other digits, so fits more easily to the whites than the blacks!
But basically, fingering is part of the practice routine. There's often suggested fingering, but most of us will be happier in the end when we've worked out our own, personal, optimal fingering for whatever we play.
The following table shows you the finger settings conforming to the rules or principles mentioned by Tim and Aaron: Priority of thumb on white key ...
F# aeolian = relative key to A-major
erster (nächster) erhöhter (erniedrigter) Ton = first (next) sharpened (flattened) tone.
(Ges wie Fis = Gb like F#)
Following this table the your second solution would be “correct”.
But as you say the melody is in the range from F# to C# you may as-well play these notes with fingers 1-5, even you think it is less comfortable.
Both solutions are possible and there’s mostly nothing correct or incorrect in playing an instrument. The main aspect is the functional norm and the functional integration, avoiding harm, inflammation, or wrong accentuation by kinesthetic obstacles.
But mind that practicing piano with the goal of improving and making progresses, doesn’t mean always to choose the path of least resistance.
Thus you can play both ways and you will practice different things: a) transposing and sensitivity of the middle finger or b) training the “slide under” technic.
Resume: both ways are practicable, useful, “correct”.
Yes, there's a general principle of piano fingering that you can play more fluently if the thumb isn't asked to hit black notes. Look at how your hand is constructed and you'll see why.
But in this special case of a melody that ONLY uses the notes F♯, G♯, A, B, C♯ it might be sensible and more fluent to use 1,2,3,4,5 rather than continually pivoting round the thumb. Keep your hand well forward on the keyboard, 3 and 4 should drop onto the white notes very easily.