Although most software out there remains under copyright, a good amount of out-of-print commercial software is made available by "abandonware" archives under the assumption that the companies that created the software have no vested interest in protecting their copyrights. For the most part, abandonware archives do in fact operate unmolested, and are especially valuable for retrocomputing enthusiasts who are still running old hardware (especially 8-bit systems and pre-OS X (and Carbon software, which could run on both macOS 9 and Mac OS X, but was dropped in Lion), and, more recently, pre-Intel Macs as Lion also dropped support for PowerPC compatibility).
Although DOS software generally runs fine in DOSBox or on the free/open source clone of DOS, FreeDOS, Windows 3.x and 9x software doesn't cooperate well with newer versions of Windows (though Windows 3.x software generally runs fine on 9x), which abandoned the 9x code in favor of the NT codebase (starting with XP improving the codebase of Windows 2000 for more types of use than business use). A patch may be available, but if it isn't, then the best option would be a copy of Windows 98 SE run through an emulator like VirtualBox (which is typically the only option nowadays, as Windows 9x can't be installed on hard drives using the now-ubiquitous SATA connection unless the BIOS includes an IDE compatibility layer). Note that without DOSBox or VirtualBox, DOS and 16-bit Windows software cannot run on 64-bit versions of Windows (which are now standard due to computers requiring more than 4 GB of RAM in some cases, such as gaming), and due to architectural differences, x86 programs won't run on ARM versions (e.g. on a tablet).
DOSBox is actually good enough to run Windows 95 now, but it still has a long way to go — it's not fully supported yet and has a bad tendency to crash. There is also no support for CD drives yet, and it must be emulated. That's also assuming you can make it through the giant pain it is to set up. There is also no support for 3D acceleration yet without special builds.