Yes, it's okay, on condition that you never let the battery voltage exceed a maximum.
The maximum is typically around 14.4V to 14.8V at 21C temperature. If the maximum is exceeded for minutes to hours, the battery will be permanently damaged. The damage occurs around the same time that flammable gas is generated and vented, so there is a risk of gas explosion near the battery.
Your setup would require constant monitoring, especially if the load is disconnected or turned off. Check the voltage every hour, and disconnect the solar panel as the voltage approaches the maximum.
To find the maximum voltage, check the manufacturer's label or datasheet for the battery.
You can make your setup safer by adding a charge controller to protect the battery (so you don't have to monitor), by ensuring there is air flow, by removing any sources of ignition for the gas, and by keeping the battery away from things it might damage as a result of an explosion.