Suppose an incumbent President loses an election in November and a supreme court vacancy were to emerge right after his loss but before the swearing-in of his successor. Would he be able to fill this vacancy especially seeing that he still is technically the president and his term expires in January according to an amendment to the constitution?
A lame duck President could nominate someone to Supreme Court vacancy, but the Senate may or may not confirm.
This happened in 1800 when John Adams lost his re-election. Chief Justice Oliver Elsworth resigned. Adams nominated John Jay (the first Chief Justice who had resigned in 1795 to become Governor of New York.) who was then confirmed by the Senate. Jay refused the appointment. Adams then nominated John Marshall who was confirmed by the Senate.
There are no rules or limitations about when, where or who a President can nominte to a Supreme Court vacancy other than that the acting President must make the nomination and the current Senate must confirm the nominee by majority vote. So yes.
Even the odd case where an acting President makes a nomination on Jan 4 (after new Congress is seated, but new President has yet to transition) and have his selection confirmed is possible. So a losing incumbent could get a confirmed SC justice if a sympathetic new Senate is elected.
Not only is the answer yes, but it would also most likely happen if the events you laid out come to pass. It is inconceivable that the senate republicans would forgo appointing another person to the SC and the senate democrats would be powerless to stop them. It would not be comparable to Obama / Garland as the republicans would still be in complete control of the relevant bodies needed to appoint and approve a SC justice (judicial appointment cannot be filibustered).
The biggest impediment would be Trump, whose behavior (assuming he loses) is basically unpredictable. He may refuse to nominate for whatever reason. The senate refusing to confirm is unthinkable assuming whatever nominee is federalist society approved.