Yes, you can grow a lemon tree indoors! Ideally for flowers and fruits to develop, you’ll need a good 6 hrs direct sunlight, but I’ve been able to get mine to bloom and thrive in a south-west facing window with about 4 hrs direct, here in the Northwest. Once frost season is over, I do move the pot to the outdoors to meet the lighting criteria
LIGHT-4-8 hrs Direct sun exposure in south facing window
WATER- Allow soil to dry out to about 4” from top soil surface.
TOXICITY- Potentially toxic if ingested in larger quantities to pets.