If it's a simple st pattern, you can usually add 2 selvage sts....one on each edge (which'll be used in the seaming). If you're planning to do mattress, make sure the sel sts are done in a way so they'll seam neatly. (Some do all garter sel, some prefer stockinette, etc.)
If working bottom up, you can finish off the last few sts and then leave a long enough tail to seam back down so you have just the one tail to weave.
ETA: here's example of hat
that can be worked as either.