Electrical control of induced magnetism in an air-stable two-dimensional semiconductor