Yes, PM in singapore is decided by cabinet but it has to be an elected MP voted in by the people (or a walkover), so if LHL loses in AMK then he cannot be PM because we dun have a appointment system that some countries have.
Nothing to say an NMP cannot be a PM / Minister.