Yes, you can use both if your trip includes different stays, but the details must clearly explain where you will stay at each stage.
Using multiple accommodation types
Travel plans that involve multiple cities or purposes can include both an invitation letter and hotel bookings. For example, you may stay with a host in one city and in a hotel in another.
How to structure your documents
In such cases, the invitation letter should specify the dates and location where the host will accommodate you. The hotel bookings should cover the remaining part of your trip.
Keeping everything consistent
All documents should align with your travel itinerary, including dates and destinations. This helps present a clear and consistent travel plan.
Providing a mixed arrangement is acceptable as long as it is well explained and does not create gaps in your accommodation details.