Balinese society is a conservative one, and people usually frown on public displays of affection. You should also beware since the Indonesian government recently made cohabitation of unmarried partners illegal.
The law shouldn’t affect foreigners, but you don’t want to draw too much attention to yourself if you’re traveling with a boyfriend or girlfriend.