Electrical switch installation
A 3-way switch connects the common (hot) alternately to each of two travelers as it is switched. You can connect one of the wires from the old switch to the common terminal on the 3-way, and the other to one of the traveler terminals, leaving the other traveler terminal unconnected. There should be a marking on the side or back of the 3-way indicating which terminal is the common.

Code requires that up is on for an unmarked switch. A 3-way is unmarked. Hook it up and see if up is on. If not, shift the wire from the connected traveler terminal to the other traveler terminal.