The LM741 (datasheet here) has a "common mode" input voltage range of not within about 3V of either supply.
In your example, with a 9V supply, you must have an input voltage in the 3V-6V range (0+3, 9-3) for the opamp to function correctly.
- The absolute maximum input common mode range varies with supply voltage. It is usually not well covered in data sheets and if stated is usually specified at a single relatively high supply voltage. I specified a Vcm of "not within 3V of either supply", based on a Vcm of +/-12V for a supply of +/-15V in the above cited datasheet. AT lower supply voltages some suggest that Vcm may be within 2V of either supply - you'd need to establish this from a relevant datasheet spec - which may not be available. It's a lot easier to use an eg LM324/358 (see below) which has a Vcm range of 0-(Vcc-1.5V).
The recommended minimum supply voltage is +/- 10V = 20V total, but a lower supply voltage can be used. How much lower is not always well specified in datasheets but a lower limit is obviously not less than the common mode input range - ie with a supply of 6.1V, if Vcm is +/-3V, you will have
6.1-6 = 0.1V of allowed input swing.
SOLUTION
The best solution to most LM741 problems is to use some other device. The LM741 is an extremely old design that has been superseded by several generations of devices with improved performance in various areas.
An excellent alternative, also very old but newer than the LM741, is the LM324 (quad) or LM358 (dual) opamp. (LM324 datasheet here
These are highly available, low cost, single supply (with some limitations) and generally well behaved and easy to use.
The LM324 is obsolete but still exceedingly useful.
The LM741 is exceedingly obsolete and, while an extremely marvellous and extremely widely used opamp in its day, is now so much harder to use and more limited in capabilities than many more modern devices that it should be allowed to bask in its historical glory.