Windows 98 did offer options regarding the MS-DOS mode (by default, "Suggest MS-DOS mode" is ticked, which is very likely the option that triggers the message you're getting).
Win ME however got rid of those advanced options (they used to be in the program tab, after you rightclick the exe and select properties), but the information inside the pif file is still there. I don't know if a standalone pif editor exists for 9x, but you could also edit it with a hex editor, basically it's 1 byte you need to alter.
You'll find it in the "WINDOWS 386 3.0" section, offset 0x29 from the beginning of this section (so if it starts at 0x187, you'll find the byte at 0x1B0). Change it from 00 to 04, that should do the trick.